mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-47ee3a09f98e8ff5/out/
common.rs

1#![doc = "MAVLink common dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#![allow(clippy::match_single_binding)]
6#[cfg(feature = "arbitrary")]
7use arbitrary::Arbitrary;
8#[allow(unused_imports)]
9use bitflags::{bitflags, Flags};
10#[allow(unused_imports)]
11use mavlink_core::{
12    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
13};
14#[allow(unused_imports)]
15use num_derive::{FromPrimitive, ToPrimitive};
16#[allow(unused_imports)]
17use num_traits::{FromPrimitive, ToPrimitive};
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23pub const DIALECT_NUMBER: u8 = 0u8;
24#[cfg_attr(feature = "ts", derive(TS))]
25#[cfg_attr(feature = "ts", ts(export))]
26#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
27#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28#[cfg_attr(feature = "serde", serde(tag = "type"))]
29#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30#[repr(u32)]
31#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
32pub enum ActuatorConfiguration {
33    #[doc = "Do nothing."]
34    ACTUATOR_CONFIGURATION_NONE = 0,
35    #[doc = "Command the actuator to beep now."]
36    ACTUATOR_CONFIGURATION_BEEP = 1,
37    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
38    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
39    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
40    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
41    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
42    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
43    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
44    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
45}
46impl ActuatorConfiguration {
47    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
48}
49impl Default for ActuatorConfiguration {
50    fn default() -> Self {
51        Self::DEFAULT
52    }
53}
54#[cfg_attr(feature = "ts", derive(TS))]
55#[cfg_attr(feature = "ts", ts(export))]
56#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
57#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
58#[cfg_attr(feature = "serde", serde(tag = "type"))]
59#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
60#[repr(u32)]
61#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
62pub enum ActuatorOutputFunction {
63    #[doc = "No function (disabled)."]
64    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
65    #[doc = "Motor 1"]
66    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
67    #[doc = "Motor 2"]
68    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
69    #[doc = "Motor 3"]
70    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
71    #[doc = "Motor 4"]
72    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
73    #[doc = "Motor 5"]
74    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
75    #[doc = "Motor 6"]
76    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
77    #[doc = "Motor 7"]
78    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
79    #[doc = "Motor 8"]
80    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
81    #[doc = "Motor 9"]
82    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
83    #[doc = "Motor 10"]
84    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
85    #[doc = "Motor 11"]
86    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
87    #[doc = "Motor 12"]
88    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
89    #[doc = "Motor 13"]
90    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
91    #[doc = "Motor 14"]
92    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
93    #[doc = "Motor 15"]
94    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
95    #[doc = "Motor 16"]
96    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
97    #[doc = "Servo 1"]
98    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
99    #[doc = "Servo 2"]
100    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
101    #[doc = "Servo 3"]
102    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
103    #[doc = "Servo 4"]
104    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
105    #[doc = "Servo 5"]
106    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
107    #[doc = "Servo 6"]
108    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
109    #[doc = "Servo 7"]
110    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
111    #[doc = "Servo 8"]
112    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
113    #[doc = "Servo 9"]
114    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
115    #[doc = "Servo 10"]
116    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
117    #[doc = "Servo 11"]
118    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
119    #[doc = "Servo 12"]
120    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
121    #[doc = "Servo 13"]
122    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
123    #[doc = "Servo 14"]
124    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
125    #[doc = "Servo 15"]
126    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
127    #[doc = "Servo 16"]
128    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
129}
130impl ActuatorOutputFunction {
131    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
132}
133impl Default for ActuatorOutputFunction {
134    fn default() -> Self {
135        Self::DEFAULT
136    }
137}
138#[cfg_attr(feature = "ts", derive(TS))]
139#[cfg_attr(feature = "ts", ts(export))]
140#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
141#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
142#[cfg_attr(feature = "serde", serde(tag = "type"))]
143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
144#[repr(u32)]
145#[doc = "Enumeration of the ADSB altimeter types"]
146pub enum AdsbAltitudeType {
147    #[doc = "Altitude reported from a Baro source using QNH reference"]
148    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
149    #[doc = "Altitude reported from a GNSS source"]
150    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
151}
152impl AdsbAltitudeType {
153    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
154}
155impl Default for AdsbAltitudeType {
156    fn default() -> Self {
157        Self::DEFAULT
158    }
159}
160#[cfg_attr(feature = "ts", derive(TS))]
161#[cfg_attr(feature = "ts", ts(export))]
162#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
164#[cfg_attr(feature = "serde", serde(tag = "type"))]
165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
166#[repr(u32)]
167#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
168pub enum AdsbEmitterType {
169    ADSB_EMITTER_TYPE_NO_INFO = 0,
170    ADSB_EMITTER_TYPE_LIGHT = 1,
171    ADSB_EMITTER_TYPE_SMALL = 2,
172    ADSB_EMITTER_TYPE_LARGE = 3,
173    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
174    ADSB_EMITTER_TYPE_HEAVY = 5,
175    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
176    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
177    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
178    ADSB_EMITTER_TYPE_GLIDER = 9,
179    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
180    ADSB_EMITTER_TYPE_PARACHUTE = 11,
181    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
182    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
183    ADSB_EMITTER_TYPE_UAV = 14,
184    ADSB_EMITTER_TYPE_SPACE = 15,
185    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
186    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
187    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
188    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
189}
190impl AdsbEmitterType {
191    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
192}
193impl Default for AdsbEmitterType {
194    fn default() -> Self {
195        Self::DEFAULT
196    }
197}
198bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
199impl AdsbFlags {
200    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
201}
202impl Default for AdsbFlags {
203    fn default() -> Self {
204        Self::DEFAULT
205    }
206}
207bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
208impl AisFlags {
209    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
210}
211impl Default for AisFlags {
212    fn default() -> Self {
213        Self::DEFAULT
214    }
215}
216#[cfg_attr(feature = "ts", derive(TS))]
217#[cfg_attr(feature = "ts", ts(export))]
218#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
220#[cfg_attr(feature = "serde", serde(tag = "type"))]
221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
222#[repr(u32)]
223#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
224pub enum AisNavStatus {
225    #[doc = "Under way using engine."]
226    UNDER_WAY = 0,
227    AIS_NAV_ANCHORED = 1,
228    AIS_NAV_UN_COMMANDED = 2,
229    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
230    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
231    AIS_NAV_MOORED = 5,
232    AIS_NAV_AGROUND = 6,
233    AIS_NAV_FISHING = 7,
234    AIS_NAV_SAILING = 8,
235    AIS_NAV_RESERVED_HSC = 9,
236    AIS_NAV_RESERVED_WIG = 10,
237    AIS_NAV_RESERVED_1 = 11,
238    AIS_NAV_RESERVED_2 = 12,
239    AIS_NAV_RESERVED_3 = 13,
240    #[doc = "Search And Rescue Transponder."]
241    AIS_NAV_AIS_SART = 14,
242    #[doc = "Not available (default)."]
243    AIS_NAV_UNKNOWN = 15,
244}
245impl AisNavStatus {
246    pub const DEFAULT: Self = Self::UNDER_WAY;
247}
248impl Default for AisNavStatus {
249    fn default() -> Self {
250        Self::DEFAULT
251    }
252}
253#[cfg_attr(feature = "ts", derive(TS))]
254#[cfg_attr(feature = "ts", ts(export))]
255#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
257#[cfg_attr(feature = "serde", serde(tag = "type"))]
258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
259#[repr(u32)]
260#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
261pub enum AisType {
262    #[doc = "Not available (default)."]
263    AIS_TYPE_UNKNOWN = 0,
264    AIS_TYPE_RESERVED_1 = 1,
265    AIS_TYPE_RESERVED_2 = 2,
266    AIS_TYPE_RESERVED_3 = 3,
267    AIS_TYPE_RESERVED_4 = 4,
268    AIS_TYPE_RESERVED_5 = 5,
269    AIS_TYPE_RESERVED_6 = 6,
270    AIS_TYPE_RESERVED_7 = 7,
271    AIS_TYPE_RESERVED_8 = 8,
272    AIS_TYPE_RESERVED_9 = 9,
273    AIS_TYPE_RESERVED_10 = 10,
274    AIS_TYPE_RESERVED_11 = 11,
275    AIS_TYPE_RESERVED_12 = 12,
276    AIS_TYPE_RESERVED_13 = 13,
277    AIS_TYPE_RESERVED_14 = 14,
278    AIS_TYPE_RESERVED_15 = 15,
279    AIS_TYPE_RESERVED_16 = 16,
280    AIS_TYPE_RESERVED_17 = 17,
281    AIS_TYPE_RESERVED_18 = 18,
282    AIS_TYPE_RESERVED_19 = 19,
283    #[doc = "Wing In Ground effect."]
284    AIS_TYPE_WIG = 20,
285    AIS_TYPE_WIG_HAZARDOUS_A = 21,
286    AIS_TYPE_WIG_HAZARDOUS_B = 22,
287    AIS_TYPE_WIG_HAZARDOUS_C = 23,
288    AIS_TYPE_WIG_HAZARDOUS_D = 24,
289    AIS_TYPE_WIG_RESERVED_1 = 25,
290    AIS_TYPE_WIG_RESERVED_2 = 26,
291    AIS_TYPE_WIG_RESERVED_3 = 27,
292    AIS_TYPE_WIG_RESERVED_4 = 28,
293    AIS_TYPE_WIG_RESERVED_5 = 29,
294    AIS_TYPE_FISHING = 30,
295    AIS_TYPE_TOWING = 31,
296    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
297    AIS_TYPE_TOWING_LARGE = 32,
298    #[doc = "Dredging or other underwater ops."]
299    AIS_TYPE_DREDGING = 33,
300    AIS_TYPE_DIVING = 34,
301    AIS_TYPE_MILITARY = 35,
302    AIS_TYPE_SAILING = 36,
303    AIS_TYPE_PLEASURE = 37,
304    AIS_TYPE_RESERVED_20 = 38,
305    AIS_TYPE_RESERVED_21 = 39,
306    #[doc = "High Speed Craft."]
307    AIS_TYPE_HSC = 40,
308    AIS_TYPE_HSC_HAZARDOUS_A = 41,
309    AIS_TYPE_HSC_HAZARDOUS_B = 42,
310    AIS_TYPE_HSC_HAZARDOUS_C = 43,
311    AIS_TYPE_HSC_HAZARDOUS_D = 44,
312    AIS_TYPE_HSC_RESERVED_1 = 45,
313    AIS_TYPE_HSC_RESERVED_2 = 46,
314    AIS_TYPE_HSC_RESERVED_3 = 47,
315    AIS_TYPE_HSC_RESERVED_4 = 48,
316    AIS_TYPE_HSC_UNKNOWN = 49,
317    AIS_TYPE_PILOT = 50,
318    #[doc = "Search And Rescue vessel."]
319    AIS_TYPE_SAR = 51,
320    AIS_TYPE_TUG = 52,
321    AIS_TYPE_PORT_TENDER = 53,
322    #[doc = "Anti-pollution equipment."]
323    AIS_TYPE_ANTI_POLLUTION = 54,
324    AIS_TYPE_LAW_ENFORCEMENT = 55,
325    AIS_TYPE_SPARE_LOCAL_1 = 56,
326    AIS_TYPE_SPARE_LOCAL_2 = 57,
327    AIS_TYPE_MEDICAL_TRANSPORT = 58,
328    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
329    AIS_TYPE_NONECOMBATANT = 59,
330    AIS_TYPE_PASSENGER = 60,
331    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
332    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
333    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
334    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
335    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
336    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
337    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
338    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
339    AIS_TYPE_PASSENGER_UNKNOWN = 69,
340    AIS_TYPE_CARGO = 70,
341    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
342    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
343    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
344    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
345    AIS_TYPE_CARGO_RESERVED_1 = 75,
346    AIS_TYPE_CARGO_RESERVED_2 = 76,
347    AIS_TYPE_CARGO_RESERVED_3 = 77,
348    AIS_TYPE_CARGO_RESERVED_4 = 78,
349    AIS_TYPE_CARGO_UNKNOWN = 79,
350    AIS_TYPE_TANKER = 80,
351    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
352    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
353    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
354    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
355    AIS_TYPE_TANKER_RESERVED_1 = 85,
356    AIS_TYPE_TANKER_RESERVED_2 = 86,
357    AIS_TYPE_TANKER_RESERVED_3 = 87,
358    AIS_TYPE_TANKER_RESERVED_4 = 88,
359    AIS_TYPE_TANKER_UNKNOWN = 89,
360    AIS_TYPE_OTHER = 90,
361    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
362    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
363    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
364    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
365    AIS_TYPE_OTHER_RESERVED_1 = 95,
366    AIS_TYPE_OTHER_RESERVED_2 = 96,
367    AIS_TYPE_OTHER_RESERVED_3 = 97,
368    AIS_TYPE_OTHER_RESERVED_4 = 98,
369    AIS_TYPE_OTHER_UNKNOWN = 99,
370}
371impl AisType {
372    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
373}
374impl Default for AisType {
375    fn default() -> Self {
376        Self::DEFAULT
377    }
378}
379bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
380impl AttitudeTargetTypemask {
381    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
382}
383impl Default for AttitudeTargetTypemask {
384    fn default() -> Self {
385        Self::DEFAULT
386    }
387}
388#[cfg_attr(feature = "ts", derive(TS))]
389#[cfg_attr(feature = "ts", ts(export))]
390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
392#[cfg_attr(feature = "serde", serde(tag = "type"))]
393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
394#[repr(u32)]
395#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
396pub enum AutotuneAxis {
397    #[doc = "Autotune roll axis."]
398    AUTOTUNE_AXIS_ROLL = 1,
399    #[doc = "Autotune pitch axis."]
400    AUTOTUNE_AXIS_PITCH = 2,
401    #[doc = "Autotune yaw axis."]
402    AUTOTUNE_AXIS_YAW = 4,
403}
404impl AutotuneAxis {
405    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
406}
407impl Default for AutotuneAxis {
408    fn default() -> Self {
409        Self::DEFAULT
410    }
411}
412bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
413impl CameraCapFlags {
414    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
415}
416impl Default for CameraCapFlags {
417    fn default() -> Self {
418        Self::DEFAULT
419    }
420}
421#[cfg_attr(feature = "ts", derive(TS))]
422#[cfg_attr(feature = "ts", ts(export))]
423#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
425#[cfg_attr(feature = "serde", serde(tag = "type"))]
426#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
427#[repr(u32)]
428#[doc = "Camera Modes."]
429pub enum CameraMode {
430    #[doc = "Camera is in image/photo capture mode."]
431    CAMERA_MODE_IMAGE = 0,
432    #[doc = "Camera is in video capture mode."]
433    CAMERA_MODE_VIDEO = 1,
434    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
435    CAMERA_MODE_IMAGE_SURVEY = 2,
436}
437impl CameraMode {
438    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
439}
440impl Default for CameraMode {
441    fn default() -> Self {
442        Self::DEFAULT
443    }
444}
445#[cfg_attr(feature = "ts", derive(TS))]
446#[cfg_attr(feature = "ts", ts(export))]
447#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
449#[cfg_attr(feature = "serde", serde(tag = "type"))]
450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
451#[repr(u32)]
452#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
453pub enum CameraSource {
454    #[doc = "Default camera source."]
455    CAMERA_SOURCE_DEFAULT = 0,
456    #[doc = "RGB camera source."]
457    CAMERA_SOURCE_RGB = 1,
458    #[doc = "IR camera source."]
459    CAMERA_SOURCE_IR = 2,
460    #[doc = "NDVI camera source."]
461    CAMERA_SOURCE_NDVI = 3,
462}
463impl CameraSource {
464    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
465}
466impl Default for CameraSource {
467    fn default() -> Self {
468        Self::DEFAULT
469    }
470}
471#[cfg_attr(feature = "ts", derive(TS))]
472#[cfg_attr(feature = "ts", ts(export))]
473#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
474#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
475#[cfg_attr(feature = "serde", serde(tag = "type"))]
476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
477#[repr(u32)]
478#[doc = "Camera tracking modes"]
479pub enum CameraTrackingMode {
480    #[doc = "Not tracking"]
481    CAMERA_TRACKING_MODE_NONE = 0,
482    #[doc = "Target is a point"]
483    CAMERA_TRACKING_MODE_POINT = 1,
484    #[doc = "Target is a rectangle"]
485    CAMERA_TRACKING_MODE_RECTANGLE = 2,
486}
487impl CameraTrackingMode {
488    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
489}
490impl Default for CameraTrackingMode {
491    fn default() -> Self {
492        Self::DEFAULT
493    }
494}
495#[cfg_attr(feature = "ts", derive(TS))]
496#[cfg_attr(feature = "ts", ts(export))]
497#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
499#[cfg_attr(feature = "serde", serde(tag = "type"))]
500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
501#[repr(u32)]
502#[doc = "Camera tracking status flags"]
503pub enum CameraTrackingStatusFlags {
504    #[doc = "Camera is not tracking"]
505    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
506    #[doc = "Camera is tracking"]
507    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
508    #[doc = "Camera tracking in error state"]
509    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
510}
511impl CameraTrackingStatusFlags {
512    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
513}
514impl Default for CameraTrackingStatusFlags {
515    fn default() -> Self {
516        Self::DEFAULT
517    }
518}
519bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
520impl CameraTrackingTargetData {
521    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
522}
523impl Default for CameraTrackingTargetData {
524    fn default() -> Self {
525        Self::DEFAULT
526    }
527}
528#[cfg_attr(feature = "ts", derive(TS))]
529#[cfg_attr(feature = "ts", ts(export))]
530#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
532#[cfg_attr(feature = "serde", serde(tag = "type"))]
533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
534#[repr(u32)]
535#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
536pub enum CameraZoomType {
537    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
538    ZOOM_TYPE_STEP = 0,
539    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
540    ZOOM_TYPE_CONTINUOUS = 1,
541    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
542    ZOOM_TYPE_RANGE = 2,
543    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
544    ZOOM_TYPE_FOCAL_LENGTH = 3,
545    #[doc = "Zoom value as horizontal field of view in degrees."]
546    ZOOM_TYPE_HORIZONTAL_FOV = 4,
547}
548impl CameraZoomType {
549    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
550}
551impl Default for CameraZoomType {
552    fn default() -> Self {
553        Self::DEFAULT
554    }
555}
556#[cfg_attr(feature = "ts", derive(TS))]
557#[cfg_attr(feature = "ts", ts(export))]
558#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
560#[cfg_attr(feature = "serde", serde(tag = "type"))]
561#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
562#[repr(u32)]
563pub enum CanFilterOp {
564    CAN_FILTER_REPLACE = 0,
565    CAN_FILTER_ADD = 1,
566    CAN_FILTER_REMOVE = 2,
567}
568impl CanFilterOp {
569    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
570}
571impl Default for CanFilterOp {
572    fn default() -> Self {
573        Self::DEFAULT
574    }
575}
576#[cfg_attr(feature = "ts", derive(TS))]
577#[cfg_attr(feature = "ts", ts(export))]
578#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
580#[cfg_attr(feature = "serde", serde(tag = "type"))]
581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
582#[repr(u32)]
583#[doc = "Possible responses from a CELLULAR_CONFIG message."]
584pub enum CellularConfigResponse {
585    #[doc = "Changes accepted."]
586    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
587    #[doc = "Invalid APN."]
588    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
589    #[doc = "Invalid PIN."]
590    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
591    #[doc = "Changes rejected."]
592    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
593    #[doc = "PUK is required to unblock SIM card."]
594    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
595}
596impl CellularConfigResponse {
597    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
598}
599impl Default for CellularConfigResponse {
600    fn default() -> Self {
601        Self::DEFAULT
602    }
603}
604#[cfg_attr(feature = "ts", derive(TS))]
605#[cfg_attr(feature = "ts", ts(export))]
606#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
608#[cfg_attr(feature = "serde", serde(tag = "type"))]
609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
610#[repr(u32)]
611#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
612pub enum CellularNetworkFailedReason {
613    #[doc = "No error"]
614    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
615    #[doc = "Error state is unknown"]
616    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
617    #[doc = "SIM is required for the modem but missing"]
618    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
619    #[doc = "SIM is available, but not usable for connection"]
620    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
621}
622impl CellularNetworkFailedReason {
623    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
624}
625impl Default for CellularNetworkFailedReason {
626    fn default() -> Self {
627        Self::DEFAULT
628    }
629}
630#[cfg_attr(feature = "ts", derive(TS))]
631#[cfg_attr(feature = "ts", ts(export))]
632#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
633#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
634#[cfg_attr(feature = "serde", serde(tag = "type"))]
635#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
636#[repr(u32)]
637#[doc = "Cellular network radio type"]
638pub enum CellularNetworkRadioType {
639    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
640    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
641    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
642    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
643    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
644}
645impl CellularNetworkRadioType {
646    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
647}
648impl Default for CellularNetworkRadioType {
649    fn default() -> Self {
650        Self::DEFAULT
651    }
652}
653#[cfg_attr(feature = "ts", derive(TS))]
654#[cfg_attr(feature = "ts", ts(export))]
655#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
656#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
657#[cfg_attr(feature = "serde", serde(tag = "type"))]
658#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
659#[repr(u32)]
660#[doc = "These flags encode the cellular network status"]
661pub enum CellularStatusFlag {
662    #[doc = "State unknown or not reportable."]
663    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
664    #[doc = "Modem is unusable"]
665    CELLULAR_STATUS_FLAG_FAILED = 1,
666    #[doc = "Modem is being initialized"]
667    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
668    #[doc = "Modem is locked"]
669    CELLULAR_STATUS_FLAG_LOCKED = 3,
670    #[doc = "Modem is not enabled and is powered down"]
671    CELLULAR_STATUS_FLAG_DISABLED = 4,
672    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
673    CELLULAR_STATUS_FLAG_DISABLING = 5,
674    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
675    CELLULAR_STATUS_FLAG_ENABLING = 6,
676    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
677    CELLULAR_STATUS_FLAG_ENABLED = 7,
678    #[doc = "Modem is searching for a network provider to register"]
679    CELLULAR_STATUS_FLAG_SEARCHING = 8,
680    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
681    CELLULAR_STATUS_FLAG_REGISTERED = 9,
682    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
683    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
684    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
685    CELLULAR_STATUS_FLAG_CONNECTING = 11,
686    #[doc = "One or more packet data bearers is active and connected"]
687    CELLULAR_STATUS_FLAG_CONNECTED = 12,
688}
689impl CellularStatusFlag {
690    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
691}
692impl Default for CellularStatusFlag {
693    fn default() -> Self {
694        Self::DEFAULT
695    }
696}
697#[cfg_attr(feature = "ts", derive(TS))]
698#[cfg_attr(feature = "ts", ts(export))]
699#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
701#[cfg_attr(feature = "serde", serde(tag = "type"))]
702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
703#[repr(u32)]
704#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
705pub enum CompMetadataType {
706    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
707    COMP_METADATA_TYPE_GENERAL = 0,
708    #[doc = "Parameter meta data."]
709    COMP_METADATA_TYPE_PARAMETER = 1,
710    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
711    COMP_METADATA_TYPE_COMMANDS = 2,
712    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
713    COMP_METADATA_TYPE_PERIPHERALS = 3,
714    #[doc = "Meta data for the events interface."]
715    COMP_METADATA_TYPE_EVENTS = 4,
716    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
717    COMP_METADATA_TYPE_ACTUATORS = 5,
718}
719impl CompMetadataType {
720    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
721}
722impl Default for CompMetadataType {
723    fn default() -> Self {
724        Self::DEFAULT
725    }
726}
727#[cfg_attr(feature = "ts", derive(TS))]
728#[cfg_attr(feature = "ts", ts(export))]
729#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
731#[cfg_attr(feature = "serde", serde(tag = "type"))]
732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
733#[repr(u32)]
734#[doc = "Indicates the ESC connection type."]
735pub enum EscConnectionType {
736    #[doc = "Traditional PPM ESC."]
737    ESC_CONNECTION_TYPE_PPM = 0,
738    #[doc = "Serial Bus connected ESC."]
739    ESC_CONNECTION_TYPE_SERIAL = 1,
740    #[doc = "One Shot PPM ESC."]
741    ESC_CONNECTION_TYPE_ONESHOT = 2,
742    #[doc = "I2C ESC."]
743    ESC_CONNECTION_TYPE_I2C = 3,
744    #[doc = "CAN-Bus ESC."]
745    ESC_CONNECTION_TYPE_CAN = 4,
746    #[doc = "DShot ESC."]
747    ESC_CONNECTION_TYPE_DSHOT = 5,
748}
749impl EscConnectionType {
750    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
751}
752impl Default for EscConnectionType {
753    fn default() -> Self {
754        Self::DEFAULT
755    }
756}
757bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
758impl EscFailureFlags {
759    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
760}
761impl Default for EscFailureFlags {
762    fn default() -> Self {
763        Self::DEFAULT
764    }
765}
766bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
767impl EstimatorStatusFlags {
768    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
769}
770impl Default for EstimatorStatusFlags {
771    fn default() -> Self {
772        Self::DEFAULT
773    }
774}
775#[cfg_attr(feature = "ts", derive(TS))]
776#[cfg_attr(feature = "ts", ts(export))]
777#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
779#[cfg_attr(feature = "serde", serde(tag = "type"))]
780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
781#[repr(u32)]
782#[doc = "List of possible failure type to inject."]
783pub enum FailureType {
784    #[doc = "No failure injected, used to reset a previous failure."]
785    FAILURE_TYPE_OK = 0,
786    #[doc = "Sets unit off, so completely non-responsive."]
787    FAILURE_TYPE_OFF = 1,
788    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
789    FAILURE_TYPE_STUCK = 2,
790    #[doc = "Unit is reporting complete garbage."]
791    FAILURE_TYPE_GARBAGE = 3,
792    #[doc = "Unit is consistently wrong."]
793    FAILURE_TYPE_WRONG = 4,
794    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
795    FAILURE_TYPE_SLOW = 5,
796    #[doc = "Data of unit is delayed in time."]
797    FAILURE_TYPE_DELAYED = 6,
798    #[doc = "Unit is sometimes working, sometimes not."]
799    FAILURE_TYPE_INTERMITTENT = 7,
800}
801impl FailureType {
802    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
803}
804impl Default for FailureType {
805    fn default() -> Self {
806        Self::DEFAULT
807    }
808}
809#[cfg_attr(feature = "ts", derive(TS))]
810#[cfg_attr(feature = "ts", ts(export))]
811#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
813#[cfg_attr(feature = "serde", serde(tag = "type"))]
814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
815#[repr(u32)]
816#[doc = "List of possible units where failures can be injected."]
817pub enum FailureUnit {
818    FAILURE_UNIT_SENSOR_GYRO = 0,
819    FAILURE_UNIT_SENSOR_ACCEL = 1,
820    FAILURE_UNIT_SENSOR_MAG = 2,
821    FAILURE_UNIT_SENSOR_BARO = 3,
822    FAILURE_UNIT_SENSOR_GPS = 4,
823    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
824    FAILURE_UNIT_SENSOR_VIO = 6,
825    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
826    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
827    FAILURE_UNIT_SYSTEM_BATTERY = 100,
828    FAILURE_UNIT_SYSTEM_MOTOR = 101,
829    FAILURE_UNIT_SYSTEM_SERVO = 102,
830    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
831    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
832    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
833}
834impl FailureUnit {
835    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
836}
837impl Default for FailureUnit {
838    fn default() -> Self {
839        Self::DEFAULT
840    }
841}
842#[cfg_attr(feature = "ts", derive(TS))]
843#[cfg_attr(feature = "ts", ts(export))]
844#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
846#[cfg_attr(feature = "serde", serde(tag = "type"))]
847#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
848#[repr(u32)]
849pub enum FenceBreach {
850    #[doc = "No last fence breach"]
851    FENCE_BREACH_NONE = 0,
852    #[doc = "Breached minimum altitude"]
853    FENCE_BREACH_MINALT = 1,
854    #[doc = "Breached maximum altitude"]
855    FENCE_BREACH_MAXALT = 2,
856    #[doc = "Breached fence boundary"]
857    FENCE_BREACH_BOUNDARY = 3,
858}
859impl FenceBreach {
860    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
861}
862impl Default for FenceBreach {
863    fn default() -> Self {
864        Self::DEFAULT
865    }
866}
867#[cfg_attr(feature = "ts", derive(TS))]
868#[cfg_attr(feature = "ts", ts(export))]
869#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
871#[cfg_attr(feature = "serde", serde(tag = "type"))]
872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
873#[repr(u32)]
874#[doc = "Actions being taken to mitigate/prevent fence breach"]
875pub enum FenceMitigate {
876    #[doc = "Unknown"]
877    FENCE_MITIGATE_UNKNOWN = 0,
878    #[doc = "No actions being taken"]
879    FENCE_MITIGATE_NONE = 1,
880    #[doc = "Velocity limiting active to prevent breach"]
881    FENCE_MITIGATE_VEL_LIMIT = 2,
882}
883impl FenceMitigate {
884    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
885}
886impl Default for FenceMitigate {
887    fn default() -> Self {
888        Self::DEFAULT
889    }
890}
891#[cfg_attr(feature = "ts", derive(TS))]
892#[cfg_attr(feature = "ts", ts(export))]
893#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
895#[cfg_attr(feature = "serde", serde(tag = "type"))]
896#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
897#[repr(u32)]
898#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
899pub enum FenceType {
900    #[doc = "Maximum altitude fence"]
901    FENCE_TYPE_ALT_MAX = 1,
902    #[doc = "Circle fence"]
903    FENCE_TYPE_CIRCLE = 2,
904    #[doc = "Polygon fence"]
905    FENCE_TYPE_POLYGON = 4,
906    #[doc = "Minimum altitude fence"]
907    FENCE_TYPE_ALT_MIN = 8,
908}
909impl FenceType {
910    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
911}
912impl Default for FenceType {
913    fn default() -> Self {
914        Self::DEFAULT
915    }
916}
917#[cfg_attr(feature = "ts", derive(TS))]
918#[cfg_attr(feature = "ts", ts(export))]
919#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
921#[cfg_attr(feature = "serde", serde(tag = "type"))]
922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
923#[repr(u32)]
924#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
925pub enum FirmwareVersionType {
926    #[doc = "development release"]
927    FIRMWARE_VERSION_TYPE_DEV = 0,
928    #[doc = "alpha release"]
929    FIRMWARE_VERSION_TYPE_ALPHA = 64,
930    #[doc = "beta release"]
931    FIRMWARE_VERSION_TYPE_BETA = 128,
932    #[doc = "release candidate"]
933    FIRMWARE_VERSION_TYPE_RC = 192,
934    #[doc = "official stable release"]
935    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
936}
937impl FirmwareVersionType {
938    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
939}
940impl Default for FirmwareVersionType {
941    fn default() -> Self {
942        Self::DEFAULT
943    }
944}
945bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
946impl GimbalDeviceCapFlags {
947    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
948}
949impl Default for GimbalDeviceCapFlags {
950    fn default() -> Self {
951        Self::DEFAULT
952    }
953}
954bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
955impl GimbalDeviceErrorFlags {
956    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
957}
958impl Default for GimbalDeviceErrorFlags {
959    fn default() -> Self {
960        Self::DEFAULT
961    }
962}
963bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
964impl GimbalDeviceFlags {
965    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
966}
967impl Default for GimbalDeviceFlags {
968    fn default() -> Self {
969        Self::DEFAULT
970    }
971}
972bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
973impl GimbalManagerCapFlags {
974    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
975}
976impl Default for GimbalManagerCapFlags {
977    fn default() -> Self {
978        Self::DEFAULT
979    }
980}
981bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
982impl GimbalManagerFlags {
983    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
984}
985impl Default for GimbalManagerFlags {
986    fn default() -> Self {
987        Self::DEFAULT
988    }
989}
990#[cfg_attr(feature = "ts", derive(TS))]
991#[cfg_attr(feature = "ts", ts(export))]
992#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
993#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
994#[cfg_attr(feature = "serde", serde(tag = "type"))]
995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
996#[repr(u32)]
997#[doc = "Type of GPS fix"]
998pub enum GpsFixType {
999    #[doc = "No GPS connected"]
1000    GPS_FIX_TYPE_NO_GPS = 0,
1001    #[doc = "No position information, GPS is connected"]
1002    GPS_FIX_TYPE_NO_FIX = 1,
1003    #[doc = "2D position"]
1004    GPS_FIX_TYPE_2D_FIX = 2,
1005    #[doc = "3D position"]
1006    GPS_FIX_TYPE_3D_FIX = 3,
1007    #[doc = "DGPS/SBAS aided 3D position"]
1008    GPS_FIX_TYPE_DGPS = 4,
1009    #[doc = "RTK float, 3D position"]
1010    GPS_FIX_TYPE_RTK_FLOAT = 5,
1011    #[doc = "RTK Fixed, 3D position"]
1012    GPS_FIX_TYPE_RTK_FIXED = 6,
1013    #[doc = "Static fixed, typically used for base stations"]
1014    GPS_FIX_TYPE_STATIC = 7,
1015    #[doc = "PPP, 3D position."]
1016    GPS_FIX_TYPE_PPP = 8,
1017}
1018impl GpsFixType {
1019    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1020}
1021impl Default for GpsFixType {
1022    fn default() -> Self {
1023        Self::DEFAULT
1024    }
1025}
1026bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1027impl GpsInputIgnoreFlags {
1028    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1029}
1030impl Default for GpsInputIgnoreFlags {
1031    fn default() -> Self {
1032        Self::DEFAULT
1033    }
1034}
1035#[cfg_attr(feature = "ts", derive(TS))]
1036#[cfg_attr(feature = "ts", ts(export))]
1037#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1039#[cfg_attr(feature = "serde", serde(tag = "type"))]
1040#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1041#[repr(u32)]
1042#[doc = "Gripper actions."]
1043pub enum GripperActions {
1044    #[doc = "Gripper release cargo."]
1045    GRIPPER_ACTION_RELEASE = 0,
1046    #[doc = "Gripper grab onto cargo."]
1047    GRIPPER_ACTION_GRAB = 1,
1048}
1049impl GripperActions {
1050    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1051}
1052impl Default for GripperActions {
1053    fn default() -> Self {
1054        Self::DEFAULT
1055    }
1056}
1057bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1058impl HighresImuUpdatedFlags {
1059    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1060}
1061impl Default for HighresImuUpdatedFlags {
1062    fn default() -> Self {
1063        Self::DEFAULT
1064    }
1065}
1066bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1067impl HilActuatorControlsFlags {
1068    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1069}
1070impl Default for HilActuatorControlsFlags {
1071    fn default() -> Self {
1072        Self::DEFAULT
1073    }
1074}
1075bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1076impl HilSensorUpdatedFlags {
1077    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1078}
1079impl Default for HilSensorUpdatedFlags {
1080    fn default() -> Self {
1081        Self::DEFAULT
1082    }
1083}
1084bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1085impl HlFailureFlag {
1086    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1087}
1088impl Default for HlFailureFlag {
1089    fn default() -> Self {
1090        Self::DEFAULT
1091    }
1092}
1093bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1094impl IlluminatorErrorFlags {
1095    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1096}
1097impl Default for IlluminatorErrorFlags {
1098    fn default() -> Self {
1099        Self::DEFAULT
1100    }
1101}
1102#[cfg_attr(feature = "ts", derive(TS))]
1103#[cfg_attr(feature = "ts", ts(export))]
1104#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1106#[cfg_attr(feature = "serde", serde(tag = "type"))]
1107#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1108#[repr(u32)]
1109#[doc = "Modes of illuminator"]
1110pub enum IlluminatorMode {
1111    #[doc = "Illuminator mode is not specified/unknown"]
1112    ILLUMINATOR_MODE_UNKNOWN = 0,
1113    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1114    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1115    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1116    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1117}
1118impl IlluminatorMode {
1119    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1120}
1121impl Default for IlluminatorMode {
1122    fn default() -> Self {
1123        Self::DEFAULT
1124    }
1125}
1126#[cfg_attr(feature = "ts", derive(TS))]
1127#[cfg_attr(feature = "ts", ts(export))]
1128#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1130#[cfg_attr(feature = "serde", serde(tag = "type"))]
1131#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1132#[repr(u32)]
1133#[doc = "Type of landing target"]
1134pub enum LandingTargetType {
1135    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1136    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1137    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1138    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1139    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1140    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1141    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1142    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1143}
1144impl LandingTargetType {
1145    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1146}
1147impl Default for LandingTargetType {
1148    fn default() -> Self {
1149        Self::DEFAULT
1150    }
1151}
1152#[cfg_attr(feature = "ts", derive(TS))]
1153#[cfg_attr(feature = "ts", ts(export))]
1154#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1156#[cfg_attr(feature = "serde", serde(tag = "type"))]
1157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1158#[repr(u32)]
1159pub enum MagCalStatus {
1160    MAG_CAL_NOT_STARTED = 0,
1161    MAG_CAL_WAITING_TO_START = 1,
1162    MAG_CAL_RUNNING_STEP_ONE = 2,
1163    MAG_CAL_RUNNING_STEP_TWO = 3,
1164    MAG_CAL_SUCCESS = 4,
1165    MAG_CAL_FAILED = 5,
1166    MAG_CAL_BAD_ORIENTATION = 6,
1167    MAG_CAL_BAD_RADIUS = 7,
1168}
1169impl MagCalStatus {
1170    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1171}
1172impl Default for MagCalStatus {
1173    fn default() -> Self {
1174        Self::DEFAULT
1175    }
1176}
1177#[cfg_attr(feature = "ts", derive(TS))]
1178#[cfg_attr(feature = "ts", ts(export))]
1179#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1180#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1181#[cfg_attr(feature = "serde", serde(tag = "type"))]
1182#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1183#[repr(u32)]
1184pub enum MavArmAuthDeniedReason {
1185    #[doc = "Not a specific reason"]
1186    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1187    #[doc = "Authorizer will send the error as string to GCS"]
1188    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1189    #[doc = "At least one waypoint have a invalid value"]
1190    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1191    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1192    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1193    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1194    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1195    #[doc = "Weather is not good to fly"]
1196    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1197}
1198impl MavArmAuthDeniedReason {
1199    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1200}
1201impl Default for MavArmAuthDeniedReason {
1202    fn default() -> Self {
1203        Self::DEFAULT
1204    }
1205}
1206#[cfg_attr(feature = "ts", derive(TS))]
1207#[cfg_attr(feature = "ts", ts(export))]
1208#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1210#[cfg_attr(feature = "serde", serde(tag = "type"))]
1211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1212#[repr(u32)]
1213#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1214pub enum MavAutopilot {
1215    #[doc = "Generic autopilot, full support for everything"]
1216    MAV_AUTOPILOT_GENERIC = 0,
1217    #[doc = "Reserved for future use."]
1218    MAV_AUTOPILOT_RESERVED = 1,
1219    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1220    MAV_AUTOPILOT_SLUGS = 2,
1221    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1222    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1223    #[doc = "OpenPilot, <http://openpilot.org>"]
1224    MAV_AUTOPILOT_OPENPILOT = 4,
1225    #[doc = "Generic autopilot only supporting simple waypoints"]
1226    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1227    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1228    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1229    #[doc = "Generic autopilot supporting the full mission command set"]
1230    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1231    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1232    MAV_AUTOPILOT_INVALID = 8,
1233    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1234    MAV_AUTOPILOT_PPZ = 9,
1235    #[doc = "UAV Dev Board"]
1236    MAV_AUTOPILOT_UDB = 10,
1237    #[doc = "FlexiPilot"]
1238    MAV_AUTOPILOT_FP = 11,
1239    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1240    MAV_AUTOPILOT_PX4 = 12,
1241    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1242    MAV_AUTOPILOT_SMACCMPILOT = 13,
1243    #[doc = "AutoQuad -- <http://autoquad.org>"]
1244    MAV_AUTOPILOT_AUTOQUAD = 14,
1245    #[doc = "Armazila -- <http://armazila.com>"]
1246    MAV_AUTOPILOT_ARMAZILA = 15,
1247    #[doc = "Aerob -- <http://aerob.ru>"]
1248    MAV_AUTOPILOT_AEROB = 16,
1249    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1250    MAV_AUTOPILOT_ASLUAV = 17,
1251    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1252    MAV_AUTOPILOT_SMARTAP = 18,
1253    #[doc = "AirRails - <http://uaventure.com>"]
1254    MAV_AUTOPILOT_AIRRAILS = 19,
1255    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1256    MAV_AUTOPILOT_REFLEX = 20,
1257}
1258impl MavAutopilot {
1259    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1260}
1261impl Default for MavAutopilot {
1262    fn default() -> Self {
1263        Self::DEFAULT
1264    }
1265}
1266#[cfg_attr(feature = "ts", derive(TS))]
1267#[cfg_attr(feature = "ts", ts(export))]
1268#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1270#[cfg_attr(feature = "serde", serde(tag = "type"))]
1271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1272#[repr(u32)]
1273#[doc = "Enumeration for battery charge states."]
1274pub enum MavBatteryChargeState {
1275    #[doc = "Low battery state is not provided"]
1276    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1277    #[doc = "Battery is not in low state. Normal operation."]
1278    MAV_BATTERY_CHARGE_STATE_OK = 1,
1279    #[doc = "Battery state is low, warn and monitor close."]
1280    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1281    #[doc = "Battery state is critical, return or abort immediately."]
1282    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1283    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1284    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1285    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1286    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1287    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1288    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1289    #[doc = "Battery is charging."]
1290    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1291}
1292impl MavBatteryChargeState {
1293    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1294}
1295impl Default for MavBatteryChargeState {
1296    fn default() -> Self {
1297        Self::DEFAULT
1298    }
1299}
1300bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1301impl MavBatteryFault {
1302    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1303}
1304impl Default for MavBatteryFault {
1305    fn default() -> Self {
1306        Self::DEFAULT
1307    }
1308}
1309#[cfg_attr(feature = "ts", derive(TS))]
1310#[cfg_attr(feature = "ts", ts(export))]
1311#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1313#[cfg_attr(feature = "serde", serde(tag = "type"))]
1314#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1315#[repr(u32)]
1316#[doc = "Enumeration of battery functions"]
1317pub enum MavBatteryFunction {
1318    #[doc = "Battery function is unknown"]
1319    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1320    #[doc = "Battery supports all flight systems"]
1321    MAV_BATTERY_FUNCTION_ALL = 1,
1322    #[doc = "Battery for the propulsion system"]
1323    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1324    #[doc = "Avionics battery"]
1325    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1326    #[doc = "Payload battery"]
1327    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1328}
1329impl MavBatteryFunction {
1330    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1331}
1332impl Default for MavBatteryFunction {
1333    fn default() -> Self {
1334        Self::DEFAULT
1335    }
1336}
1337#[cfg_attr(feature = "ts", derive(TS))]
1338#[cfg_attr(feature = "ts", ts(export))]
1339#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1341#[cfg_attr(feature = "serde", serde(tag = "type"))]
1342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1343#[repr(u32)]
1344#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1345pub enum MavBatteryMode {
1346    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1347    MAV_BATTERY_MODE_UNKNOWN = 0,
1348    #[doc = "Battery is auto discharging (towards storage level)."]
1349    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1350    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1351    MAV_BATTERY_MODE_HOT_SWAP = 2,
1352}
1353impl MavBatteryMode {
1354    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1355}
1356impl Default for MavBatteryMode {
1357    fn default() -> Self {
1358        Self::DEFAULT
1359    }
1360}
1361#[cfg_attr(feature = "ts", derive(TS))]
1362#[cfg_attr(feature = "ts", ts(export))]
1363#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1365#[cfg_attr(feature = "serde", serde(tag = "type"))]
1366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1367#[repr(u32)]
1368#[doc = "Enumeration of battery types"]
1369pub enum MavBatteryType {
1370    #[doc = "Not specified."]
1371    MAV_BATTERY_TYPE_UNKNOWN = 0,
1372    #[doc = "Lithium polymer battery"]
1373    MAV_BATTERY_TYPE_LIPO = 1,
1374    #[doc = "Lithium-iron-phosphate battery"]
1375    MAV_BATTERY_TYPE_LIFE = 2,
1376    #[doc = "Lithium-ION battery"]
1377    MAV_BATTERY_TYPE_LION = 3,
1378    #[doc = "Nickel metal hydride battery"]
1379    MAV_BATTERY_TYPE_NIMH = 4,
1380}
1381impl MavBatteryType {
1382    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1383}
1384impl Default for MavBatteryType {
1385    fn default() -> Self {
1386        Self::DEFAULT
1387    }
1388}
1389#[cfg_attr(feature = "ts", derive(TS))]
1390#[cfg_attr(feature = "ts", ts(export))]
1391#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1393#[cfg_attr(feature = "serde", serde(tag = "type"))]
1394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1395#[repr(u32)]
1396#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1397pub enum MavCmd {
1398    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1399    MAV_CMD_NAV_WAYPOINT = 16,
1400    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1401    MAV_CMD_NAV_LOITER_UNLIM = 17,
1402    #[doc = "Loiter around this waypoint for X turns"]
1403    MAV_CMD_NAV_LOITER_TURNS = 18,
1404    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1405    MAV_CMD_NAV_LOITER_TIME = 19,
1406    #[doc = "Return to launch location"]
1407    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1408    #[doc = "Land at location."]
1409    MAV_CMD_NAV_LAND = 21,
1410    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1411    MAV_CMD_NAV_TAKEOFF = 22,
1412    #[doc = "Land at local position (local frame only)"]
1413    MAV_CMD_NAV_LAND_LOCAL = 23,
1414    #[doc = "Takeoff from local position (local frame only)"]
1415    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1416    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1417    MAV_CMD_NAV_FOLLOW = 25,
1418    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1419    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1420    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1421    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1422    #[doc = "Begin following a target"]
1423    MAV_CMD_DO_FOLLOW = 32,
1424    #[doc = "Reposition the MAV after a follow target command has been sent"]
1425    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1426    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1427    MAV_CMD_DO_ORBIT = 34,
1428    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1429    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1430    MAV_CMD_NAV_ROI = 80,
1431    #[doc = "Control autonomous path planning on the MAV."]
1432    MAV_CMD_NAV_PATHPLANNING = 81,
1433    #[doc = "Navigate to waypoint using a spline path."]
1434    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1435    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1436    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1437    #[doc = "Land using VTOL mode"]
1438    MAV_CMD_NAV_VTOL_LAND = 85,
1439    #[doc = "hand control over to an external controller"]
1440    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1441    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1442    MAV_CMD_NAV_DELAY = 93,
1443    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1444    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1445    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1446    MAV_CMD_NAV_LAST = 95,
1447    #[doc = "Delay mission state machine."]
1448    MAV_CMD_CONDITION_DELAY = 112,
1449    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1450    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1451    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1452    MAV_CMD_CONDITION_DISTANCE = 114,
1453    #[doc = "Reach a certain target angle."]
1454    MAV_CMD_CONDITION_YAW = 115,
1455    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1456    MAV_CMD_CONDITION_LAST = 159,
1457    #[doc = "Set system mode."]
1458    MAV_CMD_DO_SET_MODE = 176,
1459    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1460    MAV_CMD_DO_JUMP = 177,
1461    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1462    MAV_CMD_DO_CHANGE_SPEED = 178,
1463    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1464    MAV_CMD_DO_SET_HOME = 179,
1465    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1466    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1467    MAV_CMD_DO_SET_PARAMETER = 180,
1468    #[doc = "Set a relay to a condition."]
1469    MAV_CMD_DO_SET_RELAY = 181,
1470    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1471    MAV_CMD_DO_REPEAT_RELAY = 182,
1472    #[doc = "Set a servo to a desired PWM value."]
1473    MAV_CMD_DO_SET_SERVO = 183,
1474    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1475    MAV_CMD_DO_REPEAT_SERVO = 184,
1476    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1477    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1478    #[doc = "Change altitude set point."]
1479    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1480    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1481    MAV_CMD_DO_SET_ACTUATOR = 187,
1482    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1483    MAV_CMD_DO_RETURN_PATH_START = 188,
1484    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1485    MAV_CMD_DO_LAND_START = 189,
1486    #[doc = "Mission command to perform a landing from a rally point."]
1487    MAV_CMD_DO_RALLY_LAND = 190,
1488    #[doc = "Mission command to safely abort an autonomous landing."]
1489    MAV_CMD_DO_GO_AROUND = 191,
1490    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1491    MAV_CMD_DO_REPOSITION = 192,
1492    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1493    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1494    #[doc = "Set moving direction to forward or reverse."]
1495    MAV_CMD_DO_SET_REVERSE = 194,
1496    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1497    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1498    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1499    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1500    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1501    MAV_CMD_DO_SET_ROI_NONE = 197,
1502    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1503    MAV_CMD_DO_SET_ROI_SYSID = 198,
1504    #[doc = "Control onboard camera system."]
1505    MAV_CMD_DO_CONTROL_VIDEO = 200,
1506    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1507    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1508    MAV_CMD_DO_SET_ROI = 201,
1509    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1510    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1511    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1512    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1513    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1514    #[doc = "Mission command to configure a camera or antenna mount"]
1515    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1516    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1517    #[doc = "Mission command to control a camera or antenna mount"]
1518    MAV_CMD_DO_MOUNT_CONTROL = 205,
1519    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1520    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1521    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1522    MAV_CMD_DO_FENCE_ENABLE = 207,
1523    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1524    MAV_CMD_DO_PARACHUTE = 208,
1525    #[doc = "Command to perform motor test."]
1526    MAV_CMD_DO_MOTOR_TEST = 209,
1527    #[doc = "Change to/from inverted flight."]
1528    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1529    #[doc = "Mission command to operate a gripper."]
1530    MAV_CMD_DO_GRIPPER = 211,
1531    #[doc = "Enable/disable autotune."]
1532    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1533    #[doc = "Sets a desired vehicle turn angle and speed change."]
1534    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1535    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1536    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1537    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1538    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1539    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1540    #[doc = "set id of master controller"]
1541    MAV_CMD_DO_GUIDED_MASTER = 221,
1542    #[doc = "Set limits for external control"]
1543    MAV_CMD_DO_GUIDED_LIMITS = 222,
1544    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1545    MAV_CMD_DO_ENGINE_CONTROL = 223,
1546    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1547    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1548    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1549    MAV_CMD_DO_LAST = 240,
1550    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1551    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1552    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1553    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1554    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1555    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1556    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1557    MAV_CMD_PREFLIGHT_STORAGE = 245,
1558    #[doc = "Request the reboot or shutdown of system components."]
1559    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1560    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1561    MAV_CMD_OVERRIDE_GOTO = 252,
1562    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1563    MAV_CMD_OBLIQUE_SURVEY = 260,
1564    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1565    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1566    #[doc = "start running a mission"]
1567    MAV_CMD_MISSION_START = 300,
1568    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1569    MAV_CMD_ACTUATOR_TEST = 310,
1570    #[doc = "Actuator configuration command."]
1571    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1572    #[doc = "Arms / Disarms a component"]
1573    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1574    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1575    MAV_CMD_RUN_PREARM_CHECKS = 401,
1576    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1577    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1578    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1579    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1580    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1581    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1582    MAV_CMD_GET_HOME_POSITION = 410,
1583    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1584    MAV_CMD_INJECT_FAILURE = 420,
1585    #[doc = "Starts receiver pairing."]
1586    MAV_CMD_START_RX_PAIR = 500,
1587    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1588    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1589    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1590    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1591    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1592    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1593    MAV_CMD_REQUEST_MESSAGE = 512,
1594    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1595    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1596    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1597    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1598    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1599    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1600    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1601    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1602    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1603    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1604    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1605    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1606    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1607    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1608    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1609    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1610    MAV_CMD_STORAGE_FORMAT = 526,
1611    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1612    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1613    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1614    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1615    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1616    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1617    #[doc = "Reset all camera settings to Factory Default"]
1618    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1619    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1620    MAV_CMD_SET_CAMERA_MODE = 530,
1621    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1622    MAV_CMD_SET_CAMERA_ZOOM = 531,
1623    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1624    MAV_CMD_SET_CAMERA_FOCUS = 532,
1625    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1626    MAV_CMD_SET_STORAGE_USAGE = 533,
1627    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1628    MAV_CMD_SET_CAMERA_SOURCE = 534,
1629    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1630    MAV_CMD_JUMP_TAG = 600,
1631    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1632    MAV_CMD_DO_JUMP_TAG = 601,
1633    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1634    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1635    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1636    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1637    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1638    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1639    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1640    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1641    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1642    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1643    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1644    #[doc = "Enable or disable on-board camera triggering system."]
1645    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1646    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1647    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1648    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1649    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1650    #[doc = "Stops ongoing tracking."]
1651    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1652    #[doc = "Starts video capture (recording)."]
1653    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1654    #[doc = "Stop the current video capture (recording)."]
1655    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1656    #[doc = "Start video streaming"]
1657    MAV_CMD_VIDEO_START_STREAMING = 2502,
1658    #[doc = "Stop the given video stream"]
1659    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1660    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1661    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1662    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1663    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1664    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1665    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1666    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1667    MAV_CMD_LOGGING_START = 2510,
1668    #[doc = "Request to stop streaming log data over MAVLink"]
1669    MAV_CMD_LOGGING_STOP = 2511,
1670    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1671    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1672    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1673    #[doc = "Create a panorama at the current position"]
1674    MAV_CMD_PANORAMA_CREATE = 2800,
1675    #[doc = "Request VTOL transition"]
1676    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1677    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1678    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1679    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1680    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1681    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1682    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1683    #[doc = "Delay mission state machine until gate has been reached."]
1684    MAV_CMD_CONDITION_GATE = 4501,
1685    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1686    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1687    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1688    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1689    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1690    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1691    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1692    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1693    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1694    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1695    #[doc = "Rally point. You can have multiple rally points defined."]
1696    MAV_CMD_NAV_RALLY_POINT = 5100,
1697    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1698    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1699    #[doc = "Change state of safety switch."]
1700    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1701    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1702    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1703    #[deprecated = "  (Deprecated since 2021-06)"]
1704    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1705    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1706    #[deprecated = "  (Deprecated since 2021-06)"]
1707    #[doc = "Control the payload deployment."]
1708    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1709    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1710    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1711    #[doc = "Command to operate winch."]
1712    MAV_CMD_DO_WINCH = 42600,
1713    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1714    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1715    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1716    MAV_CMD_WAYPOINT_USER_1 = 31000,
1717    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1718    MAV_CMD_WAYPOINT_USER_2 = 31001,
1719    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1720    MAV_CMD_WAYPOINT_USER_3 = 31002,
1721    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1722    MAV_CMD_WAYPOINT_USER_4 = 31003,
1723    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1724    MAV_CMD_WAYPOINT_USER_5 = 31004,
1725    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1726    MAV_CMD_SPATIAL_USER_1 = 31005,
1727    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1728    MAV_CMD_SPATIAL_USER_2 = 31006,
1729    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1730    MAV_CMD_SPATIAL_USER_3 = 31007,
1731    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1732    MAV_CMD_SPATIAL_USER_4 = 31008,
1733    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1734    MAV_CMD_SPATIAL_USER_5 = 31009,
1735    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1736    MAV_CMD_USER_1 = 31010,
1737    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1738    MAV_CMD_USER_2 = 31011,
1739    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1740    MAV_CMD_USER_3 = 31012,
1741    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1742    MAV_CMD_USER_4 = 31013,
1743    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1744    MAV_CMD_USER_5 = 31014,
1745    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1746    MAV_CMD_CAN_FORWARD = 32000,
1747}
1748impl MavCmd {
1749    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1750}
1751impl Default for MavCmd {
1752    fn default() -> Self {
1753        Self::DEFAULT
1754    }
1755}
1756#[cfg_attr(feature = "ts", derive(TS))]
1757#[cfg_attr(feature = "ts", ts(export))]
1758#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1760#[cfg_attr(feature = "serde", serde(tag = "type"))]
1761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1762#[repr(u32)]
1763#[doc = "Possible actions an aircraft can take to avoid a collision."]
1764pub enum MavCollisionAction {
1765    #[doc = "Ignore any potential collisions"]
1766    MAV_COLLISION_ACTION_NONE = 0,
1767    #[doc = "Report potential collision"]
1768    MAV_COLLISION_ACTION_REPORT = 1,
1769    #[doc = "Ascend or Descend to avoid threat"]
1770    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1771    #[doc = "Move horizontally to avoid threat"]
1772    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1773    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1774    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1775    #[doc = "Aircraft to fly directly back to its launch point"]
1776    MAV_COLLISION_ACTION_RTL = 5,
1777    #[doc = "Aircraft to stop in place"]
1778    MAV_COLLISION_ACTION_HOVER = 6,
1779}
1780impl MavCollisionAction {
1781    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1782}
1783impl Default for MavCollisionAction {
1784    fn default() -> Self {
1785        Self::DEFAULT
1786    }
1787}
1788#[cfg_attr(feature = "ts", derive(TS))]
1789#[cfg_attr(feature = "ts", ts(export))]
1790#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1791#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1792#[cfg_attr(feature = "serde", serde(tag = "type"))]
1793#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1794#[repr(u32)]
1795#[doc = "Source of information about this collision."]
1796pub enum MavCollisionSrc {
1797    #[doc = "ID field references ADSB_VEHICLE packets"]
1798    MAV_COLLISION_SRC_ADSB = 0,
1799    #[doc = "ID field references MAVLink SRC ID"]
1800    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1801}
1802impl MavCollisionSrc {
1803    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1804}
1805impl Default for MavCollisionSrc {
1806    fn default() -> Self {
1807        Self::DEFAULT
1808    }
1809}
1810#[cfg_attr(feature = "ts", derive(TS))]
1811#[cfg_attr(feature = "ts", ts(export))]
1812#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1814#[cfg_attr(feature = "serde", serde(tag = "type"))]
1815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1816#[repr(u32)]
1817#[doc = "Aircraft-rated danger from this threat."]
1818pub enum MavCollisionThreatLevel {
1819    #[doc = "Not a threat"]
1820    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1821    #[doc = "Craft is mildly concerned about this threat"]
1822    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1823    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1824    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1825}
1826impl MavCollisionThreatLevel {
1827    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1828}
1829impl Default for MavCollisionThreatLevel {
1830    fn default() -> Self {
1831        Self::DEFAULT
1832    }
1833}
1834#[cfg_attr(feature = "ts", derive(TS))]
1835#[cfg_attr(feature = "ts", ts(export))]
1836#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1837#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1838#[cfg_attr(feature = "serde", serde(tag = "type"))]
1839#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1840#[repr(u32)]
1841#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1842pub enum MavComponent {
1843    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1844    MAV_COMP_ID_ALL = 0,
1845    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1846    MAV_COMP_ID_AUTOPILOT1 = 1,
1847    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1848    MAV_COMP_ID_USER1 = 25,
1849    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1850    MAV_COMP_ID_USER2 = 26,
1851    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1852    MAV_COMP_ID_USER3 = 27,
1853    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1854    MAV_COMP_ID_USER4 = 28,
1855    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1856    MAV_COMP_ID_USER5 = 29,
1857    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1858    MAV_COMP_ID_USER6 = 30,
1859    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1860    MAV_COMP_ID_USER7 = 31,
1861    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1862    MAV_COMP_ID_USER8 = 32,
1863    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1864    MAV_COMP_ID_USER9 = 33,
1865    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1866    MAV_COMP_ID_USER10 = 34,
1867    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1868    MAV_COMP_ID_USER11 = 35,
1869    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1870    MAV_COMP_ID_USER12 = 36,
1871    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1872    MAV_COMP_ID_USER13 = 37,
1873    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1874    MAV_COMP_ID_USER14 = 38,
1875    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1876    MAV_COMP_ID_USER15 = 39,
1877    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1878    MAV_COMP_ID_USER16 = 40,
1879    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1880    MAV_COMP_ID_USER17 = 41,
1881    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1882    MAV_COMP_ID_USER18 = 42,
1883    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1884    MAV_COMP_ID_USER19 = 43,
1885    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1886    MAV_COMP_ID_USER20 = 44,
1887    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1888    MAV_COMP_ID_USER21 = 45,
1889    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1890    MAV_COMP_ID_USER22 = 46,
1891    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1892    MAV_COMP_ID_USER23 = 47,
1893    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1894    MAV_COMP_ID_USER24 = 48,
1895    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1896    MAV_COMP_ID_USER25 = 49,
1897    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1898    MAV_COMP_ID_USER26 = 50,
1899    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1900    MAV_COMP_ID_USER27 = 51,
1901    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1902    MAV_COMP_ID_USER28 = 52,
1903    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1904    MAV_COMP_ID_USER29 = 53,
1905    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1906    MAV_COMP_ID_USER30 = 54,
1907    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1908    MAV_COMP_ID_USER31 = 55,
1909    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1910    MAV_COMP_ID_USER32 = 56,
1911    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1912    MAV_COMP_ID_USER33 = 57,
1913    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1914    MAV_COMP_ID_USER34 = 58,
1915    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1916    MAV_COMP_ID_USER35 = 59,
1917    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1918    MAV_COMP_ID_USER36 = 60,
1919    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1920    MAV_COMP_ID_USER37 = 61,
1921    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1922    MAV_COMP_ID_USER38 = 62,
1923    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1924    MAV_COMP_ID_USER39 = 63,
1925    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1926    MAV_COMP_ID_USER40 = 64,
1927    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1928    MAV_COMP_ID_USER41 = 65,
1929    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1930    MAV_COMP_ID_USER42 = 66,
1931    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1932    MAV_COMP_ID_USER43 = 67,
1933    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1934    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1935    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1936    MAV_COMP_ID_USER45 = 69,
1937    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1938    MAV_COMP_ID_USER46 = 70,
1939    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1940    MAV_COMP_ID_USER47 = 71,
1941    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1942    MAV_COMP_ID_USER48 = 72,
1943    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1944    MAV_COMP_ID_USER49 = 73,
1945    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1946    MAV_COMP_ID_USER50 = 74,
1947    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1948    MAV_COMP_ID_USER51 = 75,
1949    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1950    MAV_COMP_ID_USER52 = 76,
1951    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1952    MAV_COMP_ID_USER53 = 77,
1953    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1954    MAV_COMP_ID_USER54 = 78,
1955    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1956    MAV_COMP_ID_USER55 = 79,
1957    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1958    MAV_COMP_ID_USER56 = 80,
1959    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1960    MAV_COMP_ID_USER57 = 81,
1961    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1962    MAV_COMP_ID_USER58 = 82,
1963    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1964    MAV_COMP_ID_USER59 = 83,
1965    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1966    MAV_COMP_ID_USER60 = 84,
1967    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1968    MAV_COMP_ID_USER61 = 85,
1969    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1970    MAV_COMP_ID_USER62 = 86,
1971    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1972    MAV_COMP_ID_USER63 = 87,
1973    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1974    MAV_COMP_ID_USER64 = 88,
1975    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1976    MAV_COMP_ID_USER65 = 89,
1977    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1978    MAV_COMP_ID_USER66 = 90,
1979    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1980    MAV_COMP_ID_USER67 = 91,
1981    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1982    MAV_COMP_ID_USER68 = 92,
1983    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1984    MAV_COMP_ID_USER69 = 93,
1985    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1986    MAV_COMP_ID_USER70 = 94,
1987    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1988    MAV_COMP_ID_USER71 = 95,
1989    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1990    MAV_COMP_ID_USER72 = 96,
1991    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1992    MAV_COMP_ID_USER73 = 97,
1993    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1994    MAV_COMP_ID_USER74 = 98,
1995    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1996    MAV_COMP_ID_USER75 = 99,
1997    #[doc = "Camera #1."]
1998    MAV_COMP_ID_CAMERA = 100,
1999    #[doc = "Camera #2."]
2000    MAV_COMP_ID_CAMERA2 = 101,
2001    #[doc = "Camera #3."]
2002    MAV_COMP_ID_CAMERA3 = 102,
2003    #[doc = "Camera #4."]
2004    MAV_COMP_ID_CAMERA4 = 103,
2005    #[doc = "Camera #5."]
2006    MAV_COMP_ID_CAMERA5 = 104,
2007    #[doc = "Camera #6."]
2008    MAV_COMP_ID_CAMERA6 = 105,
2009    #[doc = "Servo #1."]
2010    MAV_COMP_ID_SERVO1 = 140,
2011    #[doc = "Servo #2."]
2012    MAV_COMP_ID_SERVO2 = 141,
2013    #[doc = "Servo #3."]
2014    MAV_COMP_ID_SERVO3 = 142,
2015    #[doc = "Servo #4."]
2016    MAV_COMP_ID_SERVO4 = 143,
2017    #[doc = "Servo #5."]
2018    MAV_COMP_ID_SERVO5 = 144,
2019    #[doc = "Servo #6."]
2020    MAV_COMP_ID_SERVO6 = 145,
2021    #[doc = "Servo #7."]
2022    MAV_COMP_ID_SERVO7 = 146,
2023    #[doc = "Servo #8."]
2024    MAV_COMP_ID_SERVO8 = 147,
2025    #[doc = "Servo #9."]
2026    MAV_COMP_ID_SERVO9 = 148,
2027    #[doc = "Servo #10."]
2028    MAV_COMP_ID_SERVO10 = 149,
2029    #[doc = "Servo #11."]
2030    MAV_COMP_ID_SERVO11 = 150,
2031    #[doc = "Servo #12."]
2032    MAV_COMP_ID_SERVO12 = 151,
2033    #[doc = "Servo #13."]
2034    MAV_COMP_ID_SERVO13 = 152,
2035    #[doc = "Servo #14."]
2036    MAV_COMP_ID_SERVO14 = 153,
2037    #[doc = "Gimbal #1."]
2038    MAV_COMP_ID_GIMBAL = 154,
2039    #[doc = "Logging component."]
2040    MAV_COMP_ID_LOG = 155,
2041    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2042    MAV_COMP_ID_ADSB = 156,
2043    #[doc = "On Screen Display (OSD) devices for video links."]
2044    MAV_COMP_ID_OSD = 157,
2045    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2046    MAV_COMP_ID_PERIPHERAL = 158,
2047    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2048    #[doc = "Gimbal ID for QX1."]
2049    MAV_COMP_ID_QX1_GIMBAL = 159,
2050    #[doc = "FLARM collision alert component."]
2051    MAV_COMP_ID_FLARM = 160,
2052    #[doc = "Parachute component."]
2053    MAV_COMP_ID_PARACHUTE = 161,
2054    #[doc = "Winch component."]
2055    MAV_COMP_ID_WINCH = 169,
2056    #[doc = "Gimbal #2."]
2057    MAV_COMP_ID_GIMBAL2 = 171,
2058    #[doc = "Gimbal #3."]
2059    MAV_COMP_ID_GIMBAL3 = 172,
2060    #[doc = "Gimbal #4"]
2061    MAV_COMP_ID_GIMBAL4 = 173,
2062    #[doc = "Gimbal #5."]
2063    MAV_COMP_ID_GIMBAL5 = 174,
2064    #[doc = "Gimbal #6."]
2065    MAV_COMP_ID_GIMBAL6 = 175,
2066    #[doc = "Battery #1."]
2067    MAV_COMP_ID_BATTERY = 180,
2068    #[doc = "Battery #2."]
2069    MAV_COMP_ID_BATTERY2 = 181,
2070    #[doc = "CAN over MAVLink client."]
2071    MAV_COMP_ID_MAVCAN = 189,
2072    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2073    MAV_COMP_ID_MISSIONPLANNER = 190,
2074    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2075    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2076    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2077    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2078    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2079    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2080    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2081    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2082    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2083    MAV_COMP_ID_PATHPLANNER = 195,
2084    #[doc = "Component that plans a collision free path between two points."]
2085    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2086    #[doc = "Component that provides position estimates using VIO techniques."]
2087    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2088    #[doc = "Component that manages pairing of vehicle and GCS."]
2089    MAV_COMP_ID_PAIRING_MANAGER = 198,
2090    #[doc = "Inertial Measurement Unit (IMU) #1."]
2091    MAV_COMP_ID_IMU = 200,
2092    #[doc = "Inertial Measurement Unit (IMU) #2."]
2093    MAV_COMP_ID_IMU_2 = 201,
2094    #[doc = "Inertial Measurement Unit (IMU) #3."]
2095    MAV_COMP_ID_IMU_3 = 202,
2096    #[doc = "GPS #1."]
2097    MAV_COMP_ID_GPS = 220,
2098    #[doc = "GPS #2."]
2099    MAV_COMP_ID_GPS2 = 221,
2100    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2101    MAV_COMP_ID_ODID_TXRX_1 = 236,
2102    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2103    MAV_COMP_ID_ODID_TXRX_2 = 237,
2104    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2105    MAV_COMP_ID_ODID_TXRX_3 = 238,
2106    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2107    MAV_COMP_ID_UDP_BRIDGE = 240,
2108    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2109    MAV_COMP_ID_UART_BRIDGE = 241,
2110    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2111    MAV_COMP_ID_TUNNEL_NODE = 242,
2112    #[doc = "Illuminator"]
2113    MAV_COMP_ID_ILLUMINATOR = 243,
2114    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2115    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2116    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2117}
2118impl MavComponent {
2119    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2120}
2121impl Default for MavComponent {
2122    fn default() -> Self {
2123        Self::DEFAULT
2124    }
2125}
2126#[cfg_attr(feature = "ts", derive(TS))]
2127#[cfg_attr(feature = "ts", ts(export))]
2128#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2130#[cfg_attr(feature = "serde", serde(tag = "type"))]
2131#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2132#[repr(u32)]
2133#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2134#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2135pub enum MavDataStream {
2136    #[doc = "Enable all data streams"]
2137    MAV_DATA_STREAM_ALL = 0,
2138    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2139    MAV_DATA_STREAM_RAW_SENSORS = 1,
2140    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2141    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2142    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2143    MAV_DATA_STREAM_RC_CHANNELS = 3,
2144    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2145    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2146    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2147    MAV_DATA_STREAM_POSITION = 6,
2148    #[doc = "Dependent on the autopilot"]
2149    MAV_DATA_STREAM_EXTRA1 = 10,
2150    #[doc = "Dependent on the autopilot"]
2151    MAV_DATA_STREAM_EXTRA2 = 11,
2152    #[doc = "Dependent on the autopilot"]
2153    MAV_DATA_STREAM_EXTRA3 = 12,
2154}
2155impl MavDataStream {
2156    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2157}
2158impl Default for MavDataStream {
2159    fn default() -> Self {
2160        Self::DEFAULT
2161    }
2162}
2163#[cfg_attr(feature = "ts", derive(TS))]
2164#[cfg_attr(feature = "ts", ts(export))]
2165#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2167#[cfg_attr(feature = "serde", serde(tag = "type"))]
2168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2169#[repr(u32)]
2170#[doc = "Enumeration of distance sensor types"]
2171pub enum MavDistanceSensor {
2172    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2173    MAV_DISTANCE_SENSOR_LASER = 0,
2174    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2175    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2176    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2177    MAV_DISTANCE_SENSOR_INFRARED = 2,
2178    #[doc = "Radar type, e.g. uLanding units"]
2179    MAV_DISTANCE_SENSOR_RADAR = 3,
2180    #[doc = "Broken or unknown type, e.g. analog units"]
2181    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2182}
2183impl MavDistanceSensor {
2184    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2185}
2186impl Default for MavDistanceSensor {
2187    fn default() -> Self {
2188        Self::DEFAULT
2189    }
2190}
2191#[cfg_attr(feature = "ts", derive(TS))]
2192#[cfg_attr(feature = "ts", ts(export))]
2193#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2194#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2195#[cfg_attr(feature = "serde", serde(tag = "type"))]
2196#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2197#[repr(u32)]
2198#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2199pub enum MavDoRepositionFlags {
2200    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2201    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2202}
2203impl MavDoRepositionFlags {
2204    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2205}
2206impl Default for MavDoRepositionFlags {
2207    fn default() -> Self {
2208        Self::DEFAULT
2209    }
2210}
2211#[cfg_attr(feature = "ts", derive(TS))]
2212#[cfg_attr(feature = "ts", ts(export))]
2213#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2215#[cfg_attr(feature = "serde", serde(tag = "type"))]
2216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2217#[repr(u32)]
2218#[doc = "Enumeration of estimator types"]
2219pub enum MavEstimatorType {
2220    #[doc = "Unknown type of the estimator."]
2221    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2222    #[doc = "This is a naive estimator without any real covariance feedback."]
2223    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2224    #[doc = "Computer vision based estimate. Might be up to scale."]
2225    MAV_ESTIMATOR_TYPE_VISION = 2,
2226    #[doc = "Visual-inertial estimate."]
2227    MAV_ESTIMATOR_TYPE_VIO = 3,
2228    #[doc = "Plain GPS estimate."]
2229    MAV_ESTIMATOR_TYPE_GPS = 4,
2230    #[doc = "Estimator integrating GPS and inertial sensing."]
2231    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2232    #[doc = "Estimate from external motion capturing system."]
2233    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2234    #[doc = "Estimator based on lidar sensor input."]
2235    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2236    #[doc = "Estimator on autopilot."]
2237    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2238}
2239impl MavEstimatorType {
2240    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2241}
2242impl Default for MavEstimatorType {
2243    fn default() -> Self {
2244        Self::DEFAULT
2245    }
2246}
2247#[cfg_attr(feature = "ts", derive(TS))]
2248#[cfg_attr(feature = "ts", ts(export))]
2249#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2251#[cfg_attr(feature = "serde", serde(tag = "type"))]
2252#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2253#[repr(u32)]
2254#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2255pub enum MavEventCurrentSequenceFlags {
2256    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2257    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2258}
2259impl MavEventCurrentSequenceFlags {
2260    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2261}
2262impl Default for MavEventCurrentSequenceFlags {
2263    fn default() -> Self {
2264        Self::DEFAULT
2265    }
2266}
2267#[cfg_attr(feature = "ts", derive(TS))]
2268#[cfg_attr(feature = "ts", ts(export))]
2269#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2271#[cfg_attr(feature = "serde", serde(tag = "type"))]
2272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2273#[repr(u32)]
2274#[doc = "Reason for an event error response."]
2275pub enum MavEventErrorReason {
2276    #[doc = "The requested event is not available (anymore)."]
2277    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2278}
2279impl MavEventErrorReason {
2280    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2281}
2282impl Default for MavEventErrorReason {
2283    fn default() -> Self {
2284        Self::DEFAULT
2285    }
2286}
2287#[cfg_attr(feature = "ts", derive(TS))]
2288#[cfg_attr(feature = "ts", ts(export))]
2289#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2291#[cfg_attr(feature = "serde", serde(tag = "type"))]
2292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2293#[repr(u32)]
2294#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2295pub enum MavFrame {
2296    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2297    MAV_FRAME_GLOBAL = 0,
2298    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2299    MAV_FRAME_LOCAL_NED = 1,
2300    #[doc = "NOT a coordinate frame, indicates a mission command."]
2301    MAV_FRAME_MISSION = 2,
2302    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2303    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2304    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2305    MAV_FRAME_LOCAL_ENU = 4,
2306    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2307    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2308    MAV_FRAME_GLOBAL_INT = 5,
2309    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2310    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2311    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2312    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2313    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2314    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2315    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2316    MAV_FRAME_BODY_NED = 8,
2317    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2318    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2319    MAV_FRAME_BODY_OFFSET_NED = 9,
2320    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2321    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2322    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2323    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2324    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2325    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2326    MAV_FRAME_BODY_FRD = 12,
2327    #[deprecated = "  (Deprecated since 2019-04)"]
2328    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2329    MAV_FRAME_RESERVED_13 = 13,
2330    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2331    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2332    MAV_FRAME_RESERVED_14 = 14,
2333    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2334    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2335    MAV_FRAME_RESERVED_15 = 15,
2336    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2337    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2338    MAV_FRAME_RESERVED_16 = 16,
2339    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2340    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2341    MAV_FRAME_RESERVED_17 = 17,
2342    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2343    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2344    MAV_FRAME_RESERVED_18 = 18,
2345    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2346    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2347    MAV_FRAME_RESERVED_19 = 19,
2348    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2349    MAV_FRAME_LOCAL_FRD = 20,
2350    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2351    MAV_FRAME_LOCAL_FLU = 21,
2352}
2353impl MavFrame {
2354    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2355}
2356impl Default for MavFrame {
2357    fn default() -> Self {
2358        Self::DEFAULT
2359    }
2360}
2361#[cfg_attr(feature = "ts", derive(TS))]
2362#[cfg_attr(feature = "ts", ts(export))]
2363#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2365#[cfg_attr(feature = "serde", serde(tag = "type"))]
2366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2367#[repr(u32)]
2368#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2369pub enum MavFtpErr {
2370    #[doc = "None: No error"]
2371    MAV_FTP_ERR_NONE = 0,
2372    #[doc = "Fail: Unknown failure"]
2373    MAV_FTP_ERR_FAIL = 1,
2374    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2375    MAV_FTP_ERR_FAILERRNO = 2,
2376    #[doc = "InvalidDataSize: Payload size is invalid"]
2377    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2378    #[doc = "InvalidSession: Session is not currently open"]
2379    MAV_FTP_ERR_INVALIDSESSION = 4,
2380    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2381    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2382    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2383    MAV_FTP_ERR_EOF = 6,
2384    #[doc = "UnknownCommand: Unknown command / opcode"]
2385    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2386    #[doc = "FileExists: File/directory already exists"]
2387    MAV_FTP_ERR_FILEEXISTS = 8,
2388    #[doc = "FileProtected: File/directory is write protected"]
2389    MAV_FTP_ERR_FILEPROTECTED = 9,
2390    #[doc = "FileNotFound: File/directory not found"]
2391    MAV_FTP_ERR_FILENOTFOUND = 10,
2392}
2393impl MavFtpErr {
2394    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2395}
2396impl Default for MavFtpErr {
2397    fn default() -> Self {
2398        Self::DEFAULT
2399    }
2400}
2401#[cfg_attr(feature = "ts", derive(TS))]
2402#[cfg_attr(feature = "ts", ts(export))]
2403#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2405#[cfg_attr(feature = "serde", serde(tag = "type"))]
2406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2407#[repr(u32)]
2408#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2409pub enum MavFtpOpcode {
2410    #[doc = "None. Ignored, always ACKed"]
2411    MAV_FTP_OPCODE_NONE = 0,
2412    #[doc = "TerminateSession: Terminates open Read session"]
2413    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2414    #[doc = "ResetSessions: Terminates all open read sessions"]
2415    MAV_FTP_OPCODE_RESETSESSION = 2,
2416    #[doc = "ListDirectory. List files and directories in path from offset"]
2417    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2418    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2419    MAV_FTP_OPCODE_OPENFILERO = 4,
2420    #[doc = "ReadFile: Reads size bytes from offset in session"]
2421    MAV_FTP_OPCODE_READFILE = 5,
2422    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2423    MAV_FTP_OPCODE_CREATEFILE = 6,
2424    #[doc = "WriteFile: Writes size bytes to offset in session"]
2425    MAV_FTP_OPCODE_WRITEFILE = 7,
2426    #[doc = "RemoveFile: Remove file at path"]
2427    MAV_FTP_OPCODE_REMOVEFILE = 8,
2428    #[doc = "CreateDirectory: Creates directory at path"]
2429    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2430    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2431    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2432    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2433    MAV_FTP_OPCODE_OPENFILEWO = 11,
2434    #[doc = "TruncateFile: Truncate file at path to offset length"]
2435    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2436    #[doc = "Rename: Rename path1 to path2"]
2437    MAV_FTP_OPCODE_RENAME = 13,
2438    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2439    MAV_FTP_OPCODE_CALCFILECRC = 14,
2440    #[doc = "BurstReadFile: Burst download session file"]
2441    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2442    #[doc = "ACK: ACK response"]
2443    MAV_FTP_OPCODE_ACK = 128,
2444    #[doc = "NAK: NAK response"]
2445    MAV_FTP_OPCODE_NAK = 129,
2446}
2447impl MavFtpOpcode {
2448    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2449}
2450impl Default for MavFtpOpcode {
2451    fn default() -> Self {
2452        Self::DEFAULT
2453    }
2454}
2455#[cfg_attr(feature = "ts", derive(TS))]
2456#[cfg_attr(feature = "ts", ts(export))]
2457#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2459#[cfg_attr(feature = "serde", serde(tag = "type"))]
2460#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2461#[repr(u32)]
2462#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2463pub enum MavFuelType {
2464    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2465    MAV_FUEL_TYPE_UNKNOWN = 0,
2466    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2467    MAV_FUEL_TYPE_LIQUID = 1,
2468    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2469    MAV_FUEL_TYPE_GAS = 2,
2470}
2471impl MavFuelType {
2472    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2473}
2474impl Default for MavFuelType {
2475    fn default() -> Self {
2476        Self::DEFAULT
2477    }
2478}
2479bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2480impl MavGeneratorStatusFlag {
2481    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2482}
2483impl Default for MavGeneratorStatusFlag {
2484    fn default() -> Self {
2485        Self::DEFAULT
2486    }
2487}
2488#[cfg_attr(feature = "ts", derive(TS))]
2489#[cfg_attr(feature = "ts", ts(export))]
2490#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2491#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2492#[cfg_attr(feature = "serde", serde(tag = "type"))]
2493#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2494#[repr(u32)]
2495#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2496pub enum MavGoto {
2497    #[doc = "Hold at the current position."]
2498    MAV_GOTO_DO_HOLD = 0,
2499    #[doc = "Continue with the next item in mission execution."]
2500    MAV_GOTO_DO_CONTINUE = 1,
2501    #[doc = "Hold at the current position of the system"]
2502    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2503    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2504    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2505}
2506impl MavGoto {
2507    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2508}
2509impl Default for MavGoto {
2510    fn default() -> Self {
2511        Self::DEFAULT
2512    }
2513}
2514#[cfg_attr(feature = "ts", derive(TS))]
2515#[cfg_attr(feature = "ts", ts(export))]
2516#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2517#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2518#[cfg_attr(feature = "serde", serde(tag = "type"))]
2519#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2520#[repr(u32)]
2521#[doc = "Enumeration of landed detector states"]
2522pub enum MavLandedState {
2523    #[doc = "MAV landed state is unknown"]
2524    MAV_LANDED_STATE_UNDEFINED = 0,
2525    #[doc = "MAV is landed (on ground)"]
2526    MAV_LANDED_STATE_ON_GROUND = 1,
2527    #[doc = "MAV is in air"]
2528    MAV_LANDED_STATE_IN_AIR = 2,
2529    #[doc = "MAV currently taking off"]
2530    MAV_LANDED_STATE_TAKEOFF = 3,
2531    #[doc = "MAV currently landing"]
2532    MAV_LANDED_STATE_LANDING = 4,
2533}
2534impl MavLandedState {
2535    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2536}
2537impl Default for MavLandedState {
2538    fn default() -> Self {
2539        Self::DEFAULT
2540    }
2541}
2542#[cfg_attr(feature = "ts", derive(TS))]
2543#[cfg_attr(feature = "ts", ts(export))]
2544#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2545#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2546#[cfg_attr(feature = "serde", serde(tag = "type"))]
2547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2548#[repr(u32)]
2549#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2550pub enum MavMissionResult {
2551    #[doc = "mission accepted OK"]
2552    MAV_MISSION_ACCEPTED = 0,
2553    #[doc = "Generic error / not accepting mission commands at all right now."]
2554    MAV_MISSION_ERROR = 1,
2555    #[doc = "Coordinate frame is not supported."]
2556    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2557    #[doc = "Command is not supported."]
2558    MAV_MISSION_UNSUPPORTED = 3,
2559    #[doc = "Mission items exceed storage space."]
2560    MAV_MISSION_NO_SPACE = 4,
2561    #[doc = "One of the parameters has an invalid value."]
2562    MAV_MISSION_INVALID = 5,
2563    #[doc = "param1 has an invalid value."]
2564    MAV_MISSION_INVALID_PARAM1 = 6,
2565    #[doc = "param2 has an invalid value."]
2566    MAV_MISSION_INVALID_PARAM2 = 7,
2567    #[doc = "param3 has an invalid value."]
2568    MAV_MISSION_INVALID_PARAM3 = 8,
2569    #[doc = "param4 has an invalid value."]
2570    MAV_MISSION_INVALID_PARAM4 = 9,
2571    #[doc = "x / param5 has an invalid value."]
2572    MAV_MISSION_INVALID_PARAM5_X = 10,
2573    #[doc = "y / param6 has an invalid value."]
2574    MAV_MISSION_INVALID_PARAM6_Y = 11,
2575    #[doc = "z / param7 has an invalid value."]
2576    MAV_MISSION_INVALID_PARAM7 = 12,
2577    #[doc = "Mission item received out of sequence"]
2578    MAV_MISSION_INVALID_SEQUENCE = 13,
2579    #[doc = "Not accepting any mission commands from this communication partner."]
2580    MAV_MISSION_DENIED = 14,
2581    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2582    MAV_MISSION_OPERATION_CANCELLED = 15,
2583}
2584impl MavMissionResult {
2585    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2586}
2587impl Default for MavMissionResult {
2588    fn default() -> Self {
2589        Self::DEFAULT
2590    }
2591}
2592#[cfg_attr(feature = "ts", derive(TS))]
2593#[cfg_attr(feature = "ts", ts(export))]
2594#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2596#[cfg_attr(feature = "serde", serde(tag = "type"))]
2597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2598#[repr(u32)]
2599#[doc = "Type of mission items being requested/sent in mission protocol."]
2600pub enum MavMissionType {
2601    #[doc = "Items are mission commands for main mission."]
2602    MAV_MISSION_TYPE_MISSION = 0,
2603    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2604    MAV_MISSION_TYPE_FENCE = 1,
2605    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2606    MAV_MISSION_TYPE_RALLY = 2,
2607    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2608    MAV_MISSION_TYPE_ALL = 255,
2609}
2610impl MavMissionType {
2611    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2612}
2613impl Default for MavMissionType {
2614    fn default() -> Self {
2615        Self::DEFAULT
2616    }
2617}
2618#[cfg_attr(feature = "ts", derive(TS))]
2619#[cfg_attr(feature = "ts", ts(export))]
2620#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2622#[cfg_attr(feature = "serde", serde(tag = "type"))]
2623#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2624#[repr(u32)]
2625#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2626pub enum MavMode {
2627    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2628    MAV_MODE_PREFLIGHT = 0,
2629    #[doc = "System is allowed to be active, under assisted RC control."]
2630    MAV_MODE_STABILIZE_DISARMED = 80,
2631    #[doc = "System is allowed to be active, under assisted RC control."]
2632    MAV_MODE_STABILIZE_ARMED = 208,
2633    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2634    MAV_MODE_MANUAL_DISARMED = 64,
2635    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2636    MAV_MODE_MANUAL_ARMED = 192,
2637    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2638    MAV_MODE_GUIDED_DISARMED = 88,
2639    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2640    MAV_MODE_GUIDED_ARMED = 216,
2641    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2642    MAV_MODE_AUTO_DISARMED = 92,
2643    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2644    MAV_MODE_AUTO_ARMED = 220,
2645    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2646    MAV_MODE_TEST_DISARMED = 66,
2647    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2648    MAV_MODE_TEST_ARMED = 194,
2649}
2650impl MavMode {
2651    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2652}
2653impl Default for MavMode {
2654    fn default() -> Self {
2655        Self::DEFAULT
2656    }
2657}
2658bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2659impl MavModeFlag {
2660    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2661}
2662impl Default for MavModeFlag {
2663    fn default() -> Self {
2664        Self::DEFAULT
2665    }
2666}
2667#[cfg_attr(feature = "ts", derive(TS))]
2668#[cfg_attr(feature = "ts", ts(export))]
2669#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2670#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2671#[cfg_attr(feature = "serde", serde(tag = "type"))]
2672#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2673#[repr(u32)]
2674#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2675pub enum MavModeFlagDecodePosition {
2676    #[doc = "First bit:  10000000"]
2677    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2678    #[doc = "Second bit: 01000000"]
2679    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2680    #[doc = "Third bit:  00100000"]
2681    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2682    #[doc = "Fourth bit: 00010000"]
2683    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2684    #[doc = "Fifth bit:  00001000"]
2685    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2686    #[doc = "Sixth bit:   00000100"]
2687    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2688    #[doc = "Seventh bit: 00000010"]
2689    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2690    #[doc = "Eighth bit: 00000001"]
2691    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2692}
2693impl MavModeFlagDecodePosition {
2694    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2695}
2696impl Default for MavModeFlagDecodePosition {
2697    fn default() -> Self {
2698        Self::DEFAULT
2699    }
2700}
2701bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2702impl MavModeProperty {
2703    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2704}
2705impl Default for MavModeProperty {
2706    fn default() -> Self {
2707        Self::DEFAULT
2708    }
2709}
2710#[cfg_attr(feature = "ts", derive(TS))]
2711#[cfg_attr(feature = "ts", ts(export))]
2712#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2714#[cfg_attr(feature = "serde", serde(tag = "type"))]
2715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2716#[repr(u32)]
2717#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2718#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2719pub enum MavMountMode {
2720    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2721    MAV_MOUNT_MODE_RETRACT = 0,
2722    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2723    MAV_MOUNT_MODE_NEUTRAL = 1,
2724    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2725    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2726    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2727    MAV_MOUNT_MODE_RC_TARGETING = 3,
2728    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2729    MAV_MOUNT_MODE_GPS_POINT = 4,
2730    #[doc = "Gimbal tracks system with specified system ID"]
2731    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2732    #[doc = "Gimbal tracks home position"]
2733    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2734}
2735impl MavMountMode {
2736    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2737}
2738impl Default for MavMountMode {
2739    fn default() -> Self {
2740        Self::DEFAULT
2741    }
2742}
2743#[cfg_attr(feature = "ts", derive(TS))]
2744#[cfg_attr(feature = "ts", ts(export))]
2745#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2746#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2747#[cfg_attr(feature = "serde", serde(tag = "type"))]
2748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2749#[repr(u32)]
2750pub enum MavOdidArmStatus {
2751    #[doc = "Passing arming checks."]
2752    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2753    #[doc = "Generic arming failure, see error string for details."]
2754    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2755}
2756impl MavOdidArmStatus {
2757    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2758}
2759impl Default for MavOdidArmStatus {
2760    fn default() -> Self {
2761        Self::DEFAULT
2762    }
2763}
2764#[cfg_attr(feature = "ts", derive(TS))]
2765#[cfg_attr(feature = "ts", ts(export))]
2766#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2768#[cfg_attr(feature = "serde", serde(tag = "type"))]
2769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2770#[repr(u32)]
2771pub enum MavOdidAuthType {
2772    #[doc = "No authentication type is specified."]
2773    MAV_ODID_AUTH_TYPE_NONE = 0,
2774    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2775    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2776    #[doc = "Signature for the Operator ID."]
2777    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2778    #[doc = "Signature for the entire message set."]
2779    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2780    #[doc = "Authentication is provided by Network Remote ID."]
2781    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2782    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2783    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2784}
2785impl MavOdidAuthType {
2786    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2787}
2788impl Default for MavOdidAuthType {
2789    fn default() -> Self {
2790        Self::DEFAULT
2791    }
2792}
2793#[cfg_attr(feature = "ts", derive(TS))]
2794#[cfg_attr(feature = "ts", ts(export))]
2795#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2797#[cfg_attr(feature = "serde", serde(tag = "type"))]
2798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2799#[repr(u32)]
2800pub enum MavOdidCategoryEu {
2801    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2802    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2803    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2804    MAV_ODID_CATEGORY_EU_OPEN = 1,
2805    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2806    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2807    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2808    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2809}
2810impl MavOdidCategoryEu {
2811    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2812}
2813impl Default for MavOdidCategoryEu {
2814    fn default() -> Self {
2815        Self::DEFAULT
2816    }
2817}
2818#[cfg_attr(feature = "ts", derive(TS))]
2819#[cfg_attr(feature = "ts", ts(export))]
2820#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2822#[cfg_attr(feature = "serde", serde(tag = "type"))]
2823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2824#[repr(u32)]
2825pub enum MavOdidClassEu {
2826    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2827    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2828    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2829    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2830    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2831    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2832    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2833    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2834    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2835    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2836    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2837    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2838    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2839    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2840    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2841    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2842}
2843impl MavOdidClassEu {
2844    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2845}
2846impl Default for MavOdidClassEu {
2847    fn default() -> Self {
2848        Self::DEFAULT
2849    }
2850}
2851#[cfg_attr(feature = "ts", derive(TS))]
2852#[cfg_attr(feature = "ts", ts(export))]
2853#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2855#[cfg_attr(feature = "serde", serde(tag = "type"))]
2856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2857#[repr(u32)]
2858pub enum MavOdidClassificationType {
2859    #[doc = "The classification type for the UA is undeclared."]
2860    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2861    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2862    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2863}
2864impl MavOdidClassificationType {
2865    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2866}
2867impl Default for MavOdidClassificationType {
2868    fn default() -> Self {
2869        Self::DEFAULT
2870    }
2871}
2872#[cfg_attr(feature = "ts", derive(TS))]
2873#[cfg_attr(feature = "ts", ts(export))]
2874#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2876#[cfg_attr(feature = "serde", serde(tag = "type"))]
2877#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2878#[repr(u32)]
2879pub enum MavOdidDescType {
2880    #[doc = "Optional free-form text description of the purpose of the flight."]
2881    MAV_ODID_DESC_TYPE_TEXT = 0,
2882    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2883    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2884    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2885    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2886}
2887impl MavOdidDescType {
2888    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2889}
2890impl Default for MavOdidDescType {
2891    fn default() -> Self {
2892        Self::DEFAULT
2893    }
2894}
2895#[cfg_attr(feature = "ts", derive(TS))]
2896#[cfg_attr(feature = "ts", ts(export))]
2897#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2899#[cfg_attr(feature = "serde", serde(tag = "type"))]
2900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2901#[repr(u32)]
2902pub enum MavOdidHeightRef {
2903    #[doc = "The height field is relative to the take-off location."]
2904    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2905    #[doc = "The height field is relative to ground."]
2906    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2907}
2908impl MavOdidHeightRef {
2909    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2910}
2911impl Default for MavOdidHeightRef {
2912    fn default() -> Self {
2913        Self::DEFAULT
2914    }
2915}
2916#[cfg_attr(feature = "ts", derive(TS))]
2917#[cfg_attr(feature = "ts", ts(export))]
2918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2920#[cfg_attr(feature = "serde", serde(tag = "type"))]
2921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2922#[repr(u32)]
2923pub enum MavOdidHorAcc {
2924    #[doc = "The horizontal accuracy is unknown."]
2925    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2926    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2927    MAV_ODID_HOR_ACC_10NM = 1,
2928    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2929    MAV_ODID_HOR_ACC_4NM = 2,
2930    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2931    MAV_ODID_HOR_ACC_2NM = 3,
2932    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2933    MAV_ODID_HOR_ACC_1NM = 4,
2934    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2935    MAV_ODID_HOR_ACC_0_5NM = 5,
2936    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2937    MAV_ODID_HOR_ACC_0_3NM = 6,
2938    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2939    MAV_ODID_HOR_ACC_0_1NM = 7,
2940    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2941    MAV_ODID_HOR_ACC_0_05NM = 8,
2942    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2943    MAV_ODID_HOR_ACC_30_METER = 9,
2944    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2945    MAV_ODID_HOR_ACC_10_METER = 10,
2946    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2947    MAV_ODID_HOR_ACC_3_METER = 11,
2948    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2949    MAV_ODID_HOR_ACC_1_METER = 12,
2950}
2951impl MavOdidHorAcc {
2952    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2953}
2954impl Default for MavOdidHorAcc {
2955    fn default() -> Self {
2956        Self::DEFAULT
2957    }
2958}
2959#[cfg_attr(feature = "ts", derive(TS))]
2960#[cfg_attr(feature = "ts", ts(export))]
2961#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2962#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2963#[cfg_attr(feature = "serde", serde(tag = "type"))]
2964#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2965#[repr(u32)]
2966pub enum MavOdidIdType {
2967    #[doc = "No type defined."]
2968    MAV_ODID_ID_TYPE_NONE = 0,
2969    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2970    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2971    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2972    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2973    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2974    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2975    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2976    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2977}
2978impl MavOdidIdType {
2979    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2980}
2981impl Default for MavOdidIdType {
2982    fn default() -> Self {
2983        Self::DEFAULT
2984    }
2985}
2986#[cfg_attr(feature = "ts", derive(TS))]
2987#[cfg_attr(feature = "ts", ts(export))]
2988#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2989#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2990#[cfg_attr(feature = "serde", serde(tag = "type"))]
2991#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2992#[repr(u32)]
2993pub enum MavOdidOperatorIdType {
2994    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2995    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2996}
2997impl MavOdidOperatorIdType {
2998    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2999}
3000impl Default for MavOdidOperatorIdType {
3001    fn default() -> Self {
3002        Self::DEFAULT
3003    }
3004}
3005#[cfg_attr(feature = "ts", derive(TS))]
3006#[cfg_attr(feature = "ts", ts(export))]
3007#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3009#[cfg_attr(feature = "serde", serde(tag = "type"))]
3010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3011#[repr(u32)]
3012pub enum MavOdidOperatorLocationType {
3013    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3014    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3015    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3016    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3017    #[doc = "The location/altitude of the operator are fixed values."]
3018    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3019}
3020impl MavOdidOperatorLocationType {
3021    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3022}
3023impl Default for MavOdidOperatorLocationType {
3024    fn default() -> Self {
3025        Self::DEFAULT
3026    }
3027}
3028#[cfg_attr(feature = "ts", derive(TS))]
3029#[cfg_attr(feature = "ts", ts(export))]
3030#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3032#[cfg_attr(feature = "serde", serde(tag = "type"))]
3033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3034#[repr(u32)]
3035pub enum MavOdidSpeedAcc {
3036    #[doc = "The speed accuracy is unknown."]
3037    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3038    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3039    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3040    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3041    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3042    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3043    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3044    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3045    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3046}
3047impl MavOdidSpeedAcc {
3048    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3049}
3050impl Default for MavOdidSpeedAcc {
3051    fn default() -> Self {
3052        Self::DEFAULT
3053    }
3054}
3055#[cfg_attr(feature = "ts", derive(TS))]
3056#[cfg_attr(feature = "ts", ts(export))]
3057#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3059#[cfg_attr(feature = "serde", serde(tag = "type"))]
3060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3061#[repr(u32)]
3062pub enum MavOdidStatus {
3063    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3064    MAV_ODID_STATUS_UNDECLARED = 0,
3065    #[doc = "The UA is on the ground."]
3066    MAV_ODID_STATUS_GROUND = 1,
3067    #[doc = "The UA is in the air."]
3068    MAV_ODID_STATUS_AIRBORNE = 2,
3069    #[doc = "The UA is having an emergency."]
3070    MAV_ODID_STATUS_EMERGENCY = 3,
3071    #[doc = "The remote ID system is failing or unreliable in some way."]
3072    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3073}
3074impl MavOdidStatus {
3075    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3076}
3077impl Default for MavOdidStatus {
3078    fn default() -> Self {
3079        Self::DEFAULT
3080    }
3081}
3082#[cfg_attr(feature = "ts", derive(TS))]
3083#[cfg_attr(feature = "ts", ts(export))]
3084#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3086#[cfg_attr(feature = "serde", serde(tag = "type"))]
3087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3088#[repr(u32)]
3089pub enum MavOdidTimeAcc {
3090    #[doc = "The timestamp accuracy is unknown."]
3091    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3092    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3093    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3094    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3095    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3096    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3097    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3098    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3099    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3100    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3101    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3102    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3103    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3104    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3105    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3106    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3107    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3108    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3109    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3110    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3111    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3112    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3113    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3114    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3115    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3116    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3117    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3118    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3119    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3120    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3121    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3122}
3123impl MavOdidTimeAcc {
3124    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3125}
3126impl Default for MavOdidTimeAcc {
3127    fn default() -> Self {
3128        Self::DEFAULT
3129    }
3130}
3131#[cfg_attr(feature = "ts", derive(TS))]
3132#[cfg_attr(feature = "ts", ts(export))]
3133#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3134#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3135#[cfg_attr(feature = "serde", serde(tag = "type"))]
3136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3137#[repr(u32)]
3138pub enum MavOdidUaType {
3139    #[doc = "No UA (Unmanned Aircraft) type defined."]
3140    MAV_ODID_UA_TYPE_NONE = 0,
3141    #[doc = "Aeroplane/Airplane. Fixed wing."]
3142    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3143    #[doc = "Helicopter or multirotor."]
3144    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3145    #[doc = "Gyroplane."]
3146    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3147    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3148    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3149    #[doc = "Ornithopter."]
3150    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3151    #[doc = "Glider."]
3152    MAV_ODID_UA_TYPE_GLIDER = 6,
3153    #[doc = "Kite."]
3154    MAV_ODID_UA_TYPE_KITE = 7,
3155    #[doc = "Free Balloon."]
3156    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3157    #[doc = "Captive Balloon."]
3158    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3159    #[doc = "Airship. E.g. a blimp."]
3160    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3161    #[doc = "Free Fall/Parachute (unpowered)."]
3162    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3163    #[doc = "Rocket."]
3164    MAV_ODID_UA_TYPE_ROCKET = 12,
3165    #[doc = "Tethered powered aircraft."]
3166    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3167    #[doc = "Ground Obstacle."]
3168    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3169    #[doc = "Other type of aircraft not listed earlier."]
3170    MAV_ODID_UA_TYPE_OTHER = 15,
3171}
3172impl MavOdidUaType {
3173    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3174}
3175impl Default for MavOdidUaType {
3176    fn default() -> Self {
3177        Self::DEFAULT
3178    }
3179}
3180#[cfg_attr(feature = "ts", derive(TS))]
3181#[cfg_attr(feature = "ts", ts(export))]
3182#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3183#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3184#[cfg_attr(feature = "serde", serde(tag = "type"))]
3185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3186#[repr(u32)]
3187pub enum MavOdidVerAcc {
3188    #[doc = "The vertical accuracy is unknown."]
3189    MAV_ODID_VER_ACC_UNKNOWN = 0,
3190    #[doc = "The vertical accuracy is smaller than 150 meter."]
3191    MAV_ODID_VER_ACC_150_METER = 1,
3192    #[doc = "The vertical accuracy is smaller than 45 meter."]
3193    MAV_ODID_VER_ACC_45_METER = 2,
3194    #[doc = "The vertical accuracy is smaller than 25 meter."]
3195    MAV_ODID_VER_ACC_25_METER = 3,
3196    #[doc = "The vertical accuracy is smaller than 10 meter."]
3197    MAV_ODID_VER_ACC_10_METER = 4,
3198    #[doc = "The vertical accuracy is smaller than 3 meter."]
3199    MAV_ODID_VER_ACC_3_METER = 5,
3200    #[doc = "The vertical accuracy is smaller than 1 meter."]
3201    MAV_ODID_VER_ACC_1_METER = 6,
3202}
3203impl MavOdidVerAcc {
3204    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3205}
3206impl Default for MavOdidVerAcc {
3207    fn default() -> Self {
3208        Self::DEFAULT
3209    }
3210}
3211#[cfg_attr(feature = "ts", derive(TS))]
3212#[cfg_attr(feature = "ts", ts(export))]
3213#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3215#[cfg_attr(feature = "serde", serde(tag = "type"))]
3216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3217#[repr(u32)]
3218#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3219pub enum MavParamExtType {
3220    #[doc = "8-bit unsigned integer"]
3221    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3222    #[doc = "8-bit signed integer"]
3223    MAV_PARAM_EXT_TYPE_INT8 = 2,
3224    #[doc = "16-bit unsigned integer"]
3225    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3226    #[doc = "16-bit signed integer"]
3227    MAV_PARAM_EXT_TYPE_INT16 = 4,
3228    #[doc = "32-bit unsigned integer"]
3229    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3230    #[doc = "32-bit signed integer"]
3231    MAV_PARAM_EXT_TYPE_INT32 = 6,
3232    #[doc = "64-bit unsigned integer"]
3233    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3234    #[doc = "64-bit signed integer"]
3235    MAV_PARAM_EXT_TYPE_INT64 = 8,
3236    #[doc = "32-bit floating-point"]
3237    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3238    #[doc = "64-bit floating-point"]
3239    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3240    #[doc = "Custom Type"]
3241    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3242}
3243impl MavParamExtType {
3244    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3245}
3246impl Default for MavParamExtType {
3247    fn default() -> Self {
3248        Self::DEFAULT
3249    }
3250}
3251#[cfg_attr(feature = "ts", derive(TS))]
3252#[cfg_attr(feature = "ts", ts(export))]
3253#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3254#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3255#[cfg_attr(feature = "serde", serde(tag = "type"))]
3256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3257#[repr(u32)]
3258#[doc = "Specifies the datatype of a MAVLink parameter."]
3259pub enum MavParamType {
3260    #[doc = "8-bit unsigned integer"]
3261    MAV_PARAM_TYPE_UINT8 = 1,
3262    #[doc = "8-bit signed integer"]
3263    MAV_PARAM_TYPE_INT8 = 2,
3264    #[doc = "16-bit unsigned integer"]
3265    MAV_PARAM_TYPE_UINT16 = 3,
3266    #[doc = "16-bit signed integer"]
3267    MAV_PARAM_TYPE_INT16 = 4,
3268    #[doc = "32-bit unsigned integer"]
3269    MAV_PARAM_TYPE_UINT32 = 5,
3270    #[doc = "32-bit signed integer"]
3271    MAV_PARAM_TYPE_INT32 = 6,
3272    #[doc = "64-bit unsigned integer"]
3273    MAV_PARAM_TYPE_UINT64 = 7,
3274    #[doc = "64-bit signed integer"]
3275    MAV_PARAM_TYPE_INT64 = 8,
3276    #[doc = "32-bit floating-point"]
3277    MAV_PARAM_TYPE_REAL32 = 9,
3278    #[doc = "64-bit floating-point"]
3279    MAV_PARAM_TYPE_REAL64 = 10,
3280}
3281impl MavParamType {
3282    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3283}
3284impl Default for MavParamType {
3285    fn default() -> Self {
3286        Self::DEFAULT
3287    }
3288}
3289bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3290impl MavPowerStatus {
3291    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3292}
3293impl Default for MavPowerStatus {
3294    fn default() -> Self {
3295        Self::DEFAULT
3296    }
3297}
3298bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3299impl MavProtocolCapability {
3300    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3301}
3302impl Default for MavProtocolCapability {
3303    fn default() -> Self {
3304        Self::DEFAULT
3305    }
3306}
3307#[cfg_attr(feature = "ts", derive(TS))]
3308#[cfg_attr(feature = "ts", ts(export))]
3309#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3311#[cfg_attr(feature = "serde", serde(tag = "type"))]
3312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3313#[repr(u32)]
3314#[doc = "Result from a MAVLink command (MAV_CMD)"]
3315pub enum MavResult {
3316    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3317    MAV_RESULT_ACCEPTED = 0,
3318    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3319    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3320    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3321    MAV_RESULT_DENIED = 2,
3322    #[doc = "Command is not supported (unknown)."]
3323    MAV_RESULT_UNSUPPORTED = 3,
3324    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3325    MAV_RESULT_FAILED = 4,
3326    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3327    MAV_RESULT_IN_PROGRESS = 5,
3328    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3329    MAV_RESULT_CANCELLED = 6,
3330    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3331    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3332    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3333    MAV_RESULT_COMMAND_INT_ONLY = 8,
3334    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3335    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3336}
3337impl MavResult {
3338    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3339}
3340impl Default for MavResult {
3341    fn default() -> Self {
3342        Self::DEFAULT
3343    }
3344}
3345#[cfg_attr(feature = "ts", derive(TS))]
3346#[cfg_attr(feature = "ts", ts(export))]
3347#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3349#[cfg_attr(feature = "serde", serde(tag = "type"))]
3350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3351#[repr(u32)]
3352#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3353#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3354pub enum MavRoi {
3355    #[doc = "No region of interest."]
3356    MAV_ROI_NONE = 0,
3357    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3358    MAV_ROI_WPNEXT = 1,
3359    #[doc = "Point toward given waypoint."]
3360    MAV_ROI_WPINDEX = 2,
3361    #[doc = "Point toward fixed location."]
3362    MAV_ROI_LOCATION = 3,
3363    #[doc = "Point toward of given id."]
3364    MAV_ROI_TARGET = 4,
3365}
3366impl MavRoi {
3367    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3368}
3369impl Default for MavRoi {
3370    fn default() -> Self {
3371        Self::DEFAULT
3372    }
3373}
3374#[cfg_attr(feature = "ts", derive(TS))]
3375#[cfg_attr(feature = "ts", ts(export))]
3376#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3378#[cfg_attr(feature = "serde", serde(tag = "type"))]
3379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3380#[repr(u32)]
3381#[doc = "Enumeration of sensor orientation, according to its rotations"]
3382pub enum MavSensorOrientation {
3383    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3384    MAV_SENSOR_ROTATION_NONE = 0,
3385    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3386    MAV_SENSOR_ROTATION_YAW_45 = 1,
3387    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3388    MAV_SENSOR_ROTATION_YAW_90 = 2,
3389    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3390    MAV_SENSOR_ROTATION_YAW_135 = 3,
3391    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3392    MAV_SENSOR_ROTATION_YAW_180 = 4,
3393    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3394    MAV_SENSOR_ROTATION_YAW_225 = 5,
3395    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3396    MAV_SENSOR_ROTATION_YAW_270 = 6,
3397    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3398    MAV_SENSOR_ROTATION_YAW_315 = 7,
3399    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3400    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3401    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3402    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3403    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3404    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3405    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3406    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3407    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3408    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3409    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3410    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3411    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3412    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3413    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3414    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3415    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3416    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3417    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3418    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3419    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3420    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3421    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3422    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3423    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3424    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3425    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3426    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3427    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3428    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3429    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3430    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3431    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3432    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3433    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3434    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3435    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3436    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3437    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3438    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3439    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3440    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3441    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3442    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3443    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3444    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3445    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3446    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3447    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3448    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3449    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3450    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3451    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3452    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3453    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3454    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3455    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3456    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3457    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3458    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3459    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3460    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3461    #[doc = "Pitch: 315"]
3462    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3463    #[doc = "Roll: 90, Pitch: 315"]
3464    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3465    #[doc = "Custom orientation"]
3466    MAV_SENSOR_ROTATION_CUSTOM = 100,
3467}
3468impl MavSensorOrientation {
3469    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3470}
3471impl Default for MavSensorOrientation {
3472    fn default() -> Self {
3473        Self::DEFAULT
3474    }
3475}
3476#[cfg_attr(feature = "ts", derive(TS))]
3477#[cfg_attr(feature = "ts", ts(export))]
3478#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3480#[cfg_attr(feature = "serde", serde(tag = "type"))]
3481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3482#[repr(u32)]
3483#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3484pub enum MavSeverity {
3485    #[doc = "System is unusable. This is a \"panic\" condition."]
3486    MAV_SEVERITY_EMERGENCY = 0,
3487    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3488    MAV_SEVERITY_ALERT = 1,
3489    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3490    MAV_SEVERITY_CRITICAL = 2,
3491    #[doc = "Indicates an error in secondary/redundant systems."]
3492    MAV_SEVERITY_ERROR = 3,
3493    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3494    MAV_SEVERITY_WARNING = 4,
3495    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3496    MAV_SEVERITY_NOTICE = 5,
3497    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3498    MAV_SEVERITY_INFO = 6,
3499    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3500    MAV_SEVERITY_DEBUG = 7,
3501}
3502impl MavSeverity {
3503    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3504}
3505impl Default for MavSeverity {
3506    fn default() -> Self {
3507        Self::DEFAULT
3508    }
3509}
3510#[cfg_attr(feature = "ts", derive(TS))]
3511#[cfg_attr(feature = "ts", ts(export))]
3512#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3514#[cfg_attr(feature = "serde", serde(tag = "type"))]
3515#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3516#[repr(u32)]
3517#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3518pub enum MavStandardMode {
3519    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3520    MAV_STANDARD_MODE_NON_STANDARD = 0,
3521    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3522    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3523    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3524    MAV_STANDARD_MODE_ORBIT = 2,
3525    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3526    MAV_STANDARD_MODE_CRUISE = 3,
3527    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3528    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3529    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3530    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3531    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3532    MAV_STANDARD_MODE_MISSION = 6,
3533    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3534    MAV_STANDARD_MODE_LAND = 7,
3535    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3536    MAV_STANDARD_MODE_TAKEOFF = 8,
3537}
3538impl MavStandardMode {
3539    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3540}
3541impl Default for MavStandardMode {
3542    fn default() -> Self {
3543        Self::DEFAULT
3544    }
3545}
3546#[cfg_attr(feature = "ts", derive(TS))]
3547#[cfg_attr(feature = "ts", ts(export))]
3548#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3549#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3550#[cfg_attr(feature = "serde", serde(tag = "type"))]
3551#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3552#[repr(u32)]
3553pub enum MavState {
3554    #[doc = "Uninitialized system, state is unknown."]
3555    MAV_STATE_UNINIT = 0,
3556    #[doc = "System is booting up."]
3557    MAV_STATE_BOOT = 1,
3558    #[doc = "System is calibrating and not flight-ready."]
3559    MAV_STATE_CALIBRATING = 2,
3560    #[doc = "System is grounded and on standby. It can be launched any time."]
3561    MAV_STATE_STANDBY = 3,
3562    #[doc = "System is active and might be already airborne. Motors are engaged."]
3563    MAV_STATE_ACTIVE = 4,
3564    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3565    MAV_STATE_CRITICAL = 5,
3566    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3567    MAV_STATE_EMERGENCY = 6,
3568    #[doc = "System just initialized its power-down sequence, will shut down now."]
3569    MAV_STATE_POWEROFF = 7,
3570    #[doc = "System is terminating itself (failsafe or commanded)."]
3571    MAV_STATE_FLIGHT_TERMINATION = 8,
3572}
3573impl MavState {
3574    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3575}
3576impl Default for MavState {
3577    fn default() -> Self {
3578        Self::DEFAULT
3579    }
3580}
3581bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3582impl MavSysStatusSensor {
3583    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3584}
3585impl Default for MavSysStatusSensor {
3586    fn default() -> Self {
3587        Self::DEFAULT
3588    }
3589}
3590bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3591impl MavSysStatusSensorExtended {
3592    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3593}
3594impl Default for MavSysStatusSensorExtended {
3595    fn default() -> Self {
3596        Self::DEFAULT
3597    }
3598}
3599#[cfg_attr(feature = "ts", derive(TS))]
3600#[cfg_attr(feature = "ts", ts(export))]
3601#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3603#[cfg_attr(feature = "serde", serde(tag = "type"))]
3604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3605#[repr(u32)]
3606pub enum MavTunnelPayloadType {
3607    #[doc = "Encoding of payload unknown."]
3608    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3609    #[doc = "Registered for STorM32 gimbal controller."]
3610    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3611    #[doc = "Registered for STorM32 gimbal controller."]
3612    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3613    #[doc = "Registered for STorM32 gimbal controller."]
3614    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3615    #[doc = "Registered for STorM32 gimbal controller."]
3616    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3617    #[doc = "Registered for STorM32 gimbal controller."]
3618    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3619    #[doc = "Registered for STorM32 gimbal controller."]
3620    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3621    #[doc = "Registered for STorM32 gimbal controller."]
3622    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3623    #[doc = "Registered for STorM32 gimbal controller."]
3624    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3625    #[doc = "Registered for STorM32 gimbal controller."]
3626    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3627    #[doc = "Registered for STorM32 gimbal controller."]
3628    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3629    #[doc = "Registered for ModalAI remote OSD protocol."]
3630    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3631    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3632    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3633    #[doc = "Registered for ModalAI vendor use."]
3634    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3635}
3636impl MavTunnelPayloadType {
3637    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3638}
3639impl Default for MavTunnelPayloadType {
3640    fn default() -> Self {
3641        Self::DEFAULT
3642    }
3643}
3644#[cfg_attr(feature = "ts", derive(TS))]
3645#[cfg_attr(feature = "ts", ts(export))]
3646#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3647#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3648#[cfg_attr(feature = "serde", serde(tag = "type"))]
3649#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3650#[repr(u32)]
3651#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3652pub enum MavType {
3653    #[doc = "Generic micro air vehicle"]
3654    MAV_TYPE_GENERIC = 0,
3655    #[doc = "Fixed wing aircraft."]
3656    MAV_TYPE_FIXED_WING = 1,
3657    #[doc = "Quadrotor"]
3658    MAV_TYPE_QUADROTOR = 2,
3659    #[doc = "Coaxial helicopter"]
3660    MAV_TYPE_COAXIAL = 3,
3661    #[doc = "Normal helicopter with tail rotor."]
3662    MAV_TYPE_HELICOPTER = 4,
3663    #[doc = "Ground installation"]
3664    MAV_TYPE_ANTENNA_TRACKER = 5,
3665    #[doc = "Operator control unit / ground control station"]
3666    MAV_TYPE_GCS = 6,
3667    #[doc = "Airship, controlled"]
3668    MAV_TYPE_AIRSHIP = 7,
3669    #[doc = "Free balloon, uncontrolled"]
3670    MAV_TYPE_FREE_BALLOON = 8,
3671    #[doc = "Rocket"]
3672    MAV_TYPE_ROCKET = 9,
3673    #[doc = "Ground rover"]
3674    MAV_TYPE_GROUND_ROVER = 10,
3675    #[doc = "Surface vessel, boat, ship"]
3676    MAV_TYPE_SURFACE_BOAT = 11,
3677    #[doc = "Submarine"]
3678    MAV_TYPE_SUBMARINE = 12,
3679    #[doc = "Hexarotor"]
3680    MAV_TYPE_HEXAROTOR = 13,
3681    #[doc = "Octorotor"]
3682    MAV_TYPE_OCTOROTOR = 14,
3683    #[doc = "Tricopter"]
3684    MAV_TYPE_TRICOPTER = 15,
3685    #[doc = "Flapping wing"]
3686    MAV_TYPE_FLAPPING_WING = 16,
3687    #[doc = "Kite"]
3688    MAV_TYPE_KITE = 17,
3689    #[doc = "Onboard companion controller"]
3690    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3691    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3692    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3693    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3694    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3695    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3696    MAV_TYPE_VTOL_TILTROTOR = 21,
3697    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3698    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3699    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3700    MAV_TYPE_VTOL_TAILSITTER = 23,
3701    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3702    MAV_TYPE_VTOL_TILTWING = 24,
3703    #[doc = "VTOL reserved 5"]
3704    MAV_TYPE_VTOL_RESERVED5 = 25,
3705    #[doc = "Gimbal"]
3706    MAV_TYPE_GIMBAL = 26,
3707    #[doc = "ADSB system"]
3708    MAV_TYPE_ADSB = 27,
3709    #[doc = "Steerable, nonrigid airfoil"]
3710    MAV_TYPE_PARAFOIL = 28,
3711    #[doc = "Dodecarotor"]
3712    MAV_TYPE_DODECAROTOR = 29,
3713    #[doc = "Camera"]
3714    MAV_TYPE_CAMERA = 30,
3715    #[doc = "Charging station"]
3716    MAV_TYPE_CHARGING_STATION = 31,
3717    #[doc = "FLARM collision avoidance system"]
3718    MAV_TYPE_FLARM = 32,
3719    #[doc = "Servo"]
3720    MAV_TYPE_SERVO = 33,
3721    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3722    MAV_TYPE_ODID = 34,
3723    #[doc = "Decarotor"]
3724    MAV_TYPE_DECAROTOR = 35,
3725    #[doc = "Battery"]
3726    MAV_TYPE_BATTERY = 36,
3727    #[doc = "Parachute"]
3728    MAV_TYPE_PARACHUTE = 37,
3729    #[doc = "Log"]
3730    MAV_TYPE_LOG = 38,
3731    #[doc = "OSD"]
3732    MAV_TYPE_OSD = 39,
3733    #[doc = "IMU"]
3734    MAV_TYPE_IMU = 40,
3735    #[doc = "GPS"]
3736    MAV_TYPE_GPS = 41,
3737    #[doc = "Winch"]
3738    MAV_TYPE_WINCH = 42,
3739    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3740    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3741    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3742    MAV_TYPE_ILLUMINATOR = 44,
3743    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3744    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3745}
3746impl MavType {
3747    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3748}
3749impl Default for MavType {
3750    fn default() -> Self {
3751        Self::DEFAULT
3752    }
3753}
3754#[cfg_attr(feature = "ts", derive(TS))]
3755#[cfg_attr(feature = "ts", ts(export))]
3756#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3758#[cfg_attr(feature = "serde", serde(tag = "type"))]
3759#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3760#[repr(u32)]
3761#[doc = "Enumeration of VTOL states"]
3762pub enum MavVtolState {
3763    #[doc = "MAV is not configured as VTOL"]
3764    MAV_VTOL_STATE_UNDEFINED = 0,
3765    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3766    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3767    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3768    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3769    #[doc = "VTOL is in multicopter state"]
3770    MAV_VTOL_STATE_MC = 3,
3771    #[doc = "VTOL is in fixed-wing state"]
3772    MAV_VTOL_STATE_FW = 4,
3773}
3774impl MavVtolState {
3775    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3776}
3777impl Default for MavVtolState {
3778    fn default() -> Self {
3779        Self::DEFAULT
3780    }
3781}
3782bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3783impl MavWinchStatusFlag {
3784    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3785}
3786impl Default for MavWinchStatusFlag {
3787    fn default() -> Self {
3788        Self::DEFAULT
3789    }
3790}
3791#[cfg_attr(feature = "ts", derive(TS))]
3792#[cfg_attr(feature = "ts", ts(export))]
3793#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3795#[cfg_attr(feature = "serde", serde(tag = "type"))]
3796#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3797#[repr(u32)]
3798pub enum MavlinkDataStreamType {
3799    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3800    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3801    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3802    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3803    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3804    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3805}
3806impl MavlinkDataStreamType {
3807    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3808}
3809impl Default for MavlinkDataStreamType {
3810    fn default() -> Self {
3811        Self::DEFAULT
3812    }
3813}
3814#[cfg_attr(feature = "ts", derive(TS))]
3815#[cfg_attr(feature = "ts", ts(export))]
3816#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3818#[cfg_attr(feature = "serde", serde(tag = "type"))]
3819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3820#[repr(u32)]
3821#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3822pub enum MissionState {
3823    #[doc = "The mission status reporting is not supported."]
3824    MISSION_STATE_UNKNOWN = 0,
3825    #[doc = "No mission on the vehicle."]
3826    MISSION_STATE_NO_MISSION = 1,
3827    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3828    MISSION_STATE_NOT_STARTED = 2,
3829    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3830    MISSION_STATE_ACTIVE = 3,
3831    #[doc = "Mission is paused when in auto mode."]
3832    MISSION_STATE_PAUSED = 4,
3833    #[doc = "Mission has executed all mission items."]
3834    MISSION_STATE_COMPLETE = 5,
3835}
3836impl MissionState {
3837    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3838}
3839impl Default for MissionState {
3840    fn default() -> Self {
3841        Self::DEFAULT
3842    }
3843}
3844#[cfg_attr(feature = "ts", derive(TS))]
3845#[cfg_attr(feature = "ts", ts(export))]
3846#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3848#[cfg_attr(feature = "serde", serde(tag = "type"))]
3849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3850#[repr(u32)]
3851#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3852pub enum MotorTestOrder {
3853    #[doc = "Default autopilot motor test method."]
3854    MOTOR_TEST_ORDER_DEFAULT = 0,
3855    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3856    MOTOR_TEST_ORDER_SEQUENCE = 1,
3857    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3858    MOTOR_TEST_ORDER_BOARD = 2,
3859}
3860impl MotorTestOrder {
3861    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3862}
3863impl Default for MotorTestOrder {
3864    fn default() -> Self {
3865        Self::DEFAULT
3866    }
3867}
3868#[cfg_attr(feature = "ts", derive(TS))]
3869#[cfg_attr(feature = "ts", ts(export))]
3870#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3872#[cfg_attr(feature = "serde", serde(tag = "type"))]
3873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3874#[repr(u32)]
3875#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3876pub enum MotorTestThrottleType {
3877    #[doc = "Throttle as a percentage (0 ~ 100)"]
3878    MOTOR_TEST_THROTTLE_PERCENT = 0,
3879    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3880    MOTOR_TEST_THROTTLE_PWM = 1,
3881    #[doc = "Throttle pass-through from pilot's transmitter."]
3882    MOTOR_TEST_THROTTLE_PILOT = 2,
3883    #[doc = "Per-motor compass calibration test."]
3884    MOTOR_TEST_COMPASS_CAL = 3,
3885}
3886impl MotorTestThrottleType {
3887    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3888}
3889impl Default for MotorTestThrottleType {
3890    fn default() -> Self {
3891        Self::DEFAULT
3892    }
3893}
3894#[cfg_attr(feature = "ts", derive(TS))]
3895#[cfg_attr(feature = "ts", ts(export))]
3896#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3898#[cfg_attr(feature = "serde", serde(tag = "type"))]
3899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3900#[repr(u32)]
3901pub enum NavVtolLandOptions {
3902    #[doc = "Default autopilot landing behaviour."]
3903    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3904    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3905    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3906    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3907    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3908}
3909impl NavVtolLandOptions {
3910    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3911}
3912impl Default for NavVtolLandOptions {
3913    fn default() -> Self {
3914        Self::DEFAULT
3915    }
3916}
3917#[cfg_attr(feature = "ts", derive(TS))]
3918#[cfg_attr(feature = "ts", ts(export))]
3919#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3921#[cfg_attr(feature = "serde", serde(tag = "type"))]
3922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3923#[repr(u32)]
3924#[doc = "Yaw behaviour during orbit flight."]
3925pub enum OrbitYawBehaviour {
3926    #[doc = "Vehicle front points to the center (default)."]
3927    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3928    #[doc = "Vehicle front holds heading when message received."]
3929    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3930    #[doc = "Yaw uncontrolled."]
3931    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3932    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3933    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3934    #[doc = "Yaw controlled by RC input."]
3935    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3936    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3937    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3938}
3939impl OrbitYawBehaviour {
3940    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3941}
3942impl Default for OrbitYawBehaviour {
3943    fn default() -> Self {
3944        Self::DEFAULT
3945    }
3946}
3947#[cfg_attr(feature = "ts", derive(TS))]
3948#[cfg_attr(feature = "ts", ts(export))]
3949#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3951#[cfg_attr(feature = "serde", serde(tag = "type"))]
3952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3953#[repr(u32)]
3954#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3955pub enum ParachuteAction {
3956    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3957    PARACHUTE_DISABLE = 0,
3958    #[doc = "Enable auto-release of parachute."]
3959    PARACHUTE_ENABLE = 1,
3960    #[doc = "Release parachute and kill motors."]
3961    PARACHUTE_RELEASE = 2,
3962}
3963impl ParachuteAction {
3964    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3965}
3966impl Default for ParachuteAction {
3967    fn default() -> Self {
3968        Self::DEFAULT
3969    }
3970}
3971#[cfg_attr(feature = "ts", derive(TS))]
3972#[cfg_attr(feature = "ts", ts(export))]
3973#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3975#[cfg_attr(feature = "serde", serde(tag = "type"))]
3976#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3977#[repr(u32)]
3978#[doc = "Result from PARAM_EXT_SET message."]
3979pub enum ParamAck {
3980    #[doc = "Parameter value ACCEPTED and SET"]
3981    PARAM_ACK_ACCEPTED = 0,
3982    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3983    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3984    #[doc = "Parameter failed to set"]
3985    PARAM_ACK_FAILED = 2,
3986    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3987    PARAM_ACK_IN_PROGRESS = 3,
3988}
3989impl ParamAck {
3990    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3991}
3992impl Default for ParamAck {
3993    fn default() -> Self {
3994        Self::DEFAULT
3995    }
3996}
3997bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3998impl PositionTargetTypemask {
3999    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4000}
4001impl Default for PositionTargetTypemask {
4002    fn default() -> Self {
4003        Self::DEFAULT
4004    }
4005}
4006#[cfg_attr(feature = "ts", derive(TS))]
4007#[cfg_attr(feature = "ts", ts(export))]
4008#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4010#[cfg_attr(feature = "serde", serde(tag = "type"))]
4011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4012#[repr(u32)]
4013#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4014pub enum PrecisionLandMode {
4015    #[doc = "Normal (non-precision) landing."]
4016    PRECISION_LAND_MODE_DISABLED = 0,
4017    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4018    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4019    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4020    PRECISION_LAND_MODE_REQUIRED = 2,
4021}
4022impl PrecisionLandMode {
4023    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4024}
4025impl Default for PrecisionLandMode {
4026    fn default() -> Self {
4027        Self::DEFAULT
4028    }
4029}
4030#[cfg_attr(feature = "ts", derive(TS))]
4031#[cfg_attr(feature = "ts", ts(export))]
4032#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4033#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4034#[cfg_attr(feature = "serde", serde(tag = "type"))]
4035#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4036#[repr(u32)]
4037#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4038pub enum PreflightStorageMissionAction {
4039    #[doc = "Read current mission data from persistent storage"]
4040    MISSION_READ_PERSISTENT = 0,
4041    #[doc = "Write current mission data to persistent storage"]
4042    MISSION_WRITE_PERSISTENT = 1,
4043    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4044    MISSION_RESET_DEFAULT = 2,
4045}
4046impl PreflightStorageMissionAction {
4047    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4048}
4049impl Default for PreflightStorageMissionAction {
4050    fn default() -> Self {
4051        Self::DEFAULT
4052    }
4053}
4054#[cfg_attr(feature = "ts", derive(TS))]
4055#[cfg_attr(feature = "ts", ts(export))]
4056#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4058#[cfg_attr(feature = "serde", serde(tag = "type"))]
4059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4060#[repr(u32)]
4061#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4062pub enum PreflightStorageParameterAction {
4063    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4064    PARAM_READ_PERSISTENT = 0,
4065    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4066    PARAM_WRITE_PERSISTENT = 1,
4067    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4068    PARAM_RESET_CONFIG_DEFAULT = 2,
4069    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4070    PARAM_RESET_SENSOR_DEFAULT = 3,
4071    #[doc = "Reset all parameters, including operation counters, to default values"]
4072    PARAM_RESET_ALL_DEFAULT = 4,
4073}
4074impl PreflightStorageParameterAction {
4075    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4076}
4077impl Default for PreflightStorageParameterAction {
4078    fn default() -> Self {
4079        Self::DEFAULT
4080    }
4081}
4082#[cfg_attr(feature = "ts", derive(TS))]
4083#[cfg_attr(feature = "ts", ts(export))]
4084#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4086#[cfg_attr(feature = "serde", serde(tag = "type"))]
4087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4088#[repr(u32)]
4089#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4090pub enum RcSubType {
4091    #[doc = "Spektrum DSM2"]
4092    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4093    #[doc = "Spektrum DSMX"]
4094    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4095    #[doc = "Spektrum DSMX8"]
4096    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4097}
4098impl RcSubType {
4099    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4100}
4101impl Default for RcSubType {
4102    fn default() -> Self {
4103        Self::DEFAULT
4104    }
4105}
4106#[cfg_attr(feature = "ts", derive(TS))]
4107#[cfg_attr(feature = "ts", ts(export))]
4108#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4109#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4110#[cfg_attr(feature = "serde", serde(tag = "type"))]
4111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4112#[repr(u32)]
4113#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4114pub enum RcType {
4115    #[doc = "Spektrum"]
4116    RC_TYPE_SPEKTRUM = 0,
4117    #[doc = "CRSF"]
4118    RC_TYPE_CRSF = 1,
4119}
4120impl RcType {
4121    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4122}
4123impl Default for RcType {
4124    fn default() -> Self {
4125        Self::DEFAULT
4126    }
4127}
4128#[cfg_attr(feature = "ts", derive(TS))]
4129#[cfg_attr(feature = "ts", ts(export))]
4130#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4132#[cfg_attr(feature = "serde", serde(tag = "type"))]
4133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4134#[repr(u32)]
4135#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4136pub enum RebootShutdownConditions {
4137    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4138    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4139    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4140    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4141}
4142impl RebootShutdownConditions {
4143    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4144}
4145impl Default for RebootShutdownConditions {
4146    fn default() -> Self {
4147        Self::DEFAULT
4148    }
4149}
4150#[cfg_attr(feature = "ts", derive(TS))]
4151#[cfg_attr(feature = "ts", ts(export))]
4152#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4154#[cfg_attr(feature = "serde", serde(tag = "type"))]
4155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4156#[repr(u32)]
4157#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4158pub enum RtkBaselineCoordinateSystem {
4159    #[doc = "Earth-centered, Earth-fixed"]
4160    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4161    #[doc = "RTK basestation centered, north, east, down"]
4162    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4163}
4164impl RtkBaselineCoordinateSystem {
4165    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4166}
4167impl Default for RtkBaselineCoordinateSystem {
4168    fn default() -> Self {
4169        Self::DEFAULT
4170    }
4171}
4172#[cfg_attr(feature = "ts", derive(TS))]
4173#[cfg_attr(feature = "ts", ts(export))]
4174#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4175#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4176#[cfg_attr(feature = "serde", serde(tag = "type"))]
4177#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4178#[repr(u32)]
4179#[doc = "Possible safety switch states."]
4180pub enum SafetySwitchState {
4181    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4182    SAFETY_SWITCH_STATE_SAFE = 0,
4183    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4184    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4185}
4186impl SafetySwitchState {
4187    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4188}
4189impl Default for SafetySwitchState {
4190    fn default() -> Self {
4191        Self::DEFAULT
4192    }
4193}
4194#[cfg_attr(feature = "ts", derive(TS))]
4195#[cfg_attr(feature = "ts", ts(export))]
4196#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4198#[cfg_attr(feature = "serde", serde(tag = "type"))]
4199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4200#[repr(u32)]
4201#[doc = "SERIAL_CONTROL device types"]
4202pub enum SerialControlDev {
4203    #[doc = "First telemetry port"]
4204    SERIAL_CONTROL_DEV_TELEM1 = 0,
4205    #[doc = "Second telemetry port"]
4206    SERIAL_CONTROL_DEV_TELEM2 = 1,
4207    #[doc = "First GPS port"]
4208    SERIAL_CONTROL_DEV_GPS1 = 2,
4209    #[doc = "Second GPS port"]
4210    SERIAL_CONTROL_DEV_GPS2 = 3,
4211    #[doc = "system shell"]
4212    SERIAL_CONTROL_DEV_SHELL = 10,
4213    #[doc = "SERIAL0"]
4214    SERIAL_CONTROL_SERIAL0 = 100,
4215    #[doc = "SERIAL1"]
4216    SERIAL_CONTROL_SERIAL1 = 101,
4217    #[doc = "SERIAL2"]
4218    SERIAL_CONTROL_SERIAL2 = 102,
4219    #[doc = "SERIAL3"]
4220    SERIAL_CONTROL_SERIAL3 = 103,
4221    #[doc = "SERIAL4"]
4222    SERIAL_CONTROL_SERIAL4 = 104,
4223    #[doc = "SERIAL5"]
4224    SERIAL_CONTROL_SERIAL5 = 105,
4225    #[doc = "SERIAL6"]
4226    SERIAL_CONTROL_SERIAL6 = 106,
4227    #[doc = "SERIAL7"]
4228    SERIAL_CONTROL_SERIAL7 = 107,
4229    #[doc = "SERIAL8"]
4230    SERIAL_CONTROL_SERIAL8 = 108,
4231    #[doc = "SERIAL9"]
4232    SERIAL_CONTROL_SERIAL9 = 109,
4233}
4234impl SerialControlDev {
4235    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4236}
4237impl Default for SerialControlDev {
4238    fn default() -> Self {
4239        Self::DEFAULT
4240    }
4241}
4242bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4243impl SerialControlFlag {
4244    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4245}
4246impl Default for SerialControlFlag {
4247    fn default() -> Self {
4248        Self::DEFAULT
4249    }
4250}
4251#[cfg_attr(feature = "ts", derive(TS))]
4252#[cfg_attr(feature = "ts", ts(export))]
4253#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4254#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4255#[cfg_attr(feature = "serde", serde(tag = "type"))]
4256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4257#[repr(u32)]
4258#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4259pub enum SetFocusType {
4260    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4261    FOCUS_TYPE_STEP = 0,
4262    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4263    FOCUS_TYPE_CONTINUOUS = 1,
4264    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4265    FOCUS_TYPE_RANGE = 2,
4266    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4267    FOCUS_TYPE_METERS = 3,
4268    #[doc = "Focus automatically."]
4269    FOCUS_TYPE_AUTO = 4,
4270    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4271    FOCUS_TYPE_AUTO_SINGLE = 5,
4272    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4273    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4274}
4275impl SetFocusType {
4276    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4277}
4278impl Default for SetFocusType {
4279    fn default() -> Self {
4280        Self::DEFAULT
4281    }
4282}
4283#[cfg_attr(feature = "ts", derive(TS))]
4284#[cfg_attr(feature = "ts", ts(export))]
4285#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4286#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4287#[cfg_attr(feature = "serde", serde(tag = "type"))]
4288#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4289#[repr(u32)]
4290#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4291pub enum SpeedType {
4292    #[doc = "Airspeed"]
4293    SPEED_TYPE_AIRSPEED = 0,
4294    #[doc = "Groundspeed"]
4295    SPEED_TYPE_GROUNDSPEED = 1,
4296    #[doc = "Climb speed"]
4297    SPEED_TYPE_CLIMB_SPEED = 2,
4298    #[doc = "Descent speed"]
4299    SPEED_TYPE_DESCENT_SPEED = 3,
4300}
4301impl SpeedType {
4302    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4303}
4304impl Default for SpeedType {
4305    fn default() -> Self {
4306        Self::DEFAULT
4307    }
4308}
4309#[cfg_attr(feature = "ts", derive(TS))]
4310#[cfg_attr(feature = "ts", ts(export))]
4311#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4313#[cfg_attr(feature = "serde", serde(tag = "type"))]
4314#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4315#[repr(u32)]
4316#[doc = "Flags to indicate the status of camera storage."]
4317pub enum StorageStatus {
4318    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4319    STORAGE_STATUS_EMPTY = 0,
4320    #[doc = "Storage present but unformatted."]
4321    STORAGE_STATUS_UNFORMATTED = 1,
4322    #[doc = "Storage present and ready."]
4323    STORAGE_STATUS_READY = 2,
4324    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4325    STORAGE_STATUS_NOT_SUPPORTED = 3,
4326}
4327impl StorageStatus {
4328    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4329}
4330impl Default for StorageStatus {
4331    fn default() -> Self {
4332        Self::DEFAULT
4333    }
4334}
4335#[cfg_attr(feature = "ts", derive(TS))]
4336#[cfg_attr(feature = "ts", ts(export))]
4337#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4338#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4339#[cfg_attr(feature = "serde", serde(tag = "type"))]
4340#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4341#[repr(u32)]
4342#[doc = "Flags to indicate the type of storage."]
4343pub enum StorageType {
4344    #[doc = "Storage type is not known."]
4345    STORAGE_TYPE_UNKNOWN = 0,
4346    #[doc = "Storage type is USB device."]
4347    STORAGE_TYPE_USB_STICK = 1,
4348    #[doc = "Storage type is SD card."]
4349    STORAGE_TYPE_SD = 2,
4350    #[doc = "Storage type is microSD card."]
4351    STORAGE_TYPE_MICROSD = 3,
4352    #[doc = "Storage type is CFast."]
4353    STORAGE_TYPE_CF = 4,
4354    #[doc = "Storage type is CFexpress."]
4355    STORAGE_TYPE_CFE = 5,
4356    #[doc = "Storage type is XQD."]
4357    STORAGE_TYPE_XQD = 6,
4358    #[doc = "Storage type is HD mass storage type."]
4359    STORAGE_TYPE_HD = 7,
4360    #[doc = "Storage type is other, not listed type."]
4361    STORAGE_TYPE_OTHER = 254,
4362}
4363impl StorageType {
4364    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4365}
4366impl Default for StorageType {
4367    fn default() -> Self {
4368        Self::DEFAULT
4369    }
4370}
4371bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4372impl StorageUsageFlag {
4373    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4374}
4375impl Default for StorageUsageFlag {
4376    fn default() -> Self {
4377        Self::DEFAULT
4378    }
4379}
4380#[cfg_attr(feature = "ts", derive(TS))]
4381#[cfg_attr(feature = "ts", ts(export))]
4382#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4384#[cfg_attr(feature = "serde", serde(tag = "type"))]
4385#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4386#[repr(u32)]
4387#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4388pub enum TuneFormat {
4389    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4390    TUNE_FORMAT_QBASIC1_1 = 1,
4391    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4392    TUNE_FORMAT_MML_MODERN = 2,
4393}
4394impl TuneFormat {
4395    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4396}
4397impl Default for TuneFormat {
4398    fn default() -> Self {
4399        Self::DEFAULT
4400    }
4401}
4402#[cfg_attr(feature = "ts", derive(TS))]
4403#[cfg_attr(feature = "ts", ts(export))]
4404#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4406#[cfg_attr(feature = "serde", serde(tag = "type"))]
4407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4408#[repr(u32)]
4409#[doc = "Generalized UAVCAN node health"]
4410pub enum UavcanNodeHealth {
4411    #[doc = "The node is functioning properly."]
4412    UAVCAN_NODE_HEALTH_OK = 0,
4413    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4414    UAVCAN_NODE_HEALTH_WARNING = 1,
4415    #[doc = "The node has encountered a major failure."]
4416    UAVCAN_NODE_HEALTH_ERROR = 2,
4417    #[doc = "The node has suffered a fatal malfunction."]
4418    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4419}
4420impl UavcanNodeHealth {
4421    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4422}
4423impl Default for UavcanNodeHealth {
4424    fn default() -> Self {
4425        Self::DEFAULT
4426    }
4427}
4428#[cfg_attr(feature = "ts", derive(TS))]
4429#[cfg_attr(feature = "ts", ts(export))]
4430#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4431#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4432#[cfg_attr(feature = "serde", serde(tag = "type"))]
4433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4434#[repr(u32)]
4435#[doc = "Generalized UAVCAN node mode"]
4436pub enum UavcanNodeMode {
4437    #[doc = "The node is performing its primary functions."]
4438    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4439    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4440    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4441    #[doc = "The node is under maintenance."]
4442    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4443    #[doc = "The node is in the process of updating its software."]
4444    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4445    #[doc = "The node is no longer available online."]
4446    UAVCAN_NODE_MODE_OFFLINE = 7,
4447}
4448impl UavcanNodeMode {
4449    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4450}
4451impl Default for UavcanNodeMode {
4452    fn default() -> Self {
4453        Self::DEFAULT
4454    }
4455}
4456bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4457impl UtmDataAvailFlags {
4458    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4459}
4460impl Default for UtmDataAvailFlags {
4461    fn default() -> Self {
4462        Self::DEFAULT
4463    }
4464}
4465#[cfg_attr(feature = "ts", derive(TS))]
4466#[cfg_attr(feature = "ts", ts(export))]
4467#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4469#[cfg_attr(feature = "serde", serde(tag = "type"))]
4470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4471#[repr(u32)]
4472#[doc = "Airborne status of UAS."]
4473pub enum UtmFlightState {
4474    #[doc = "The flight state can't be determined."]
4475    UTM_FLIGHT_STATE_UNKNOWN = 1,
4476    #[doc = "UAS on ground."]
4477    UTM_FLIGHT_STATE_GROUND = 2,
4478    #[doc = "UAS airborne."]
4479    UTM_FLIGHT_STATE_AIRBORNE = 3,
4480    #[doc = "UAS is in an emergency flight state."]
4481    UTM_FLIGHT_STATE_EMERGENCY = 16,
4482    #[doc = "UAS has no active controls."]
4483    UTM_FLIGHT_STATE_NOCTRL = 32,
4484}
4485impl UtmFlightState {
4486    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4487}
4488impl Default for UtmFlightState {
4489    fn default() -> Self {
4490        Self::DEFAULT
4491    }
4492}
4493#[cfg_attr(feature = "ts", derive(TS))]
4494#[cfg_attr(feature = "ts", ts(export))]
4495#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4497#[cfg_attr(feature = "serde", serde(tag = "type"))]
4498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4499#[repr(u32)]
4500#[doc = "Video stream encodings"]
4501pub enum VideoStreamEncoding {
4502    #[doc = "Stream encoding is unknown"]
4503    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4504    #[doc = "Stream encoding is H.264"]
4505    VIDEO_STREAM_ENCODING_H264 = 1,
4506    #[doc = "Stream encoding is H.265"]
4507    VIDEO_STREAM_ENCODING_H265 = 2,
4508}
4509impl VideoStreamEncoding {
4510    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4511}
4512impl Default for VideoStreamEncoding {
4513    fn default() -> Self {
4514        Self::DEFAULT
4515    }
4516}
4517bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4518impl VideoStreamStatusFlags {
4519    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4520}
4521impl Default for VideoStreamStatusFlags {
4522    fn default() -> Self {
4523        Self::DEFAULT
4524    }
4525}
4526#[cfg_attr(feature = "ts", derive(TS))]
4527#[cfg_attr(feature = "ts", ts(export))]
4528#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4529#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4530#[cfg_attr(feature = "serde", serde(tag = "type"))]
4531#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4532#[repr(u32)]
4533#[doc = "Video stream types"]
4534pub enum VideoStreamType {
4535    #[doc = "Stream is RTSP"]
4536    VIDEO_STREAM_TYPE_RTSP = 0,
4537    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4538    VIDEO_STREAM_TYPE_RTPUDP = 1,
4539    #[doc = "Stream is MPEG on TCP"]
4540    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4541    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4542    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4543}
4544impl VideoStreamType {
4545    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4546}
4547impl Default for VideoStreamType {
4548    fn default() -> Self {
4549        Self::DEFAULT
4550    }
4551}
4552#[cfg_attr(feature = "ts", derive(TS))]
4553#[cfg_attr(feature = "ts", ts(export))]
4554#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4556#[cfg_attr(feature = "serde", serde(tag = "type"))]
4557#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4558#[repr(u32)]
4559#[doc = "Direction of VTOL transition"]
4560pub enum VtolTransitionHeading {
4561    #[doc = "Respect the heading configuration of the vehicle."]
4562    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4563    #[doc = "Use the heading pointing towards the next waypoint."]
4564    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4565    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4566    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4567    #[doc = "Use the specified heading in parameter 4."]
4568    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4569    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4570    VTOL_TRANSITION_HEADING_ANY = 4,
4571}
4572impl VtolTransitionHeading {
4573    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4574}
4575impl Default for VtolTransitionHeading {
4576    fn default() -> Self {
4577        Self::DEFAULT
4578    }
4579}
4580#[cfg_attr(feature = "ts", derive(TS))]
4581#[cfg_attr(feature = "ts", ts(export))]
4582#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4584#[cfg_attr(feature = "serde", serde(tag = "type"))]
4585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4586#[repr(u32)]
4587#[doc = "WiFi Mode."]
4588pub enum WifiConfigApMode {
4589    #[doc = "WiFi mode is undefined."]
4590    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4591    #[doc = "WiFi configured as an access point."]
4592    WIFI_CONFIG_AP_MODE_AP = 1,
4593    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4594    WIFI_CONFIG_AP_MODE_STATION = 2,
4595    #[doc = "WiFi disabled."]
4596    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4597}
4598impl WifiConfigApMode {
4599    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4600}
4601impl Default for WifiConfigApMode {
4602    fn default() -> Self {
4603        Self::DEFAULT
4604    }
4605}
4606#[cfg_attr(feature = "ts", derive(TS))]
4607#[cfg_attr(feature = "ts", ts(export))]
4608#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4610#[cfg_attr(feature = "serde", serde(tag = "type"))]
4611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4612#[repr(u32)]
4613#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4614pub enum WifiConfigApResponse {
4615    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4616    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4617    #[doc = "Changes accepted."]
4618    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4619    #[doc = "Changes rejected."]
4620    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4621    #[doc = "Invalid Mode."]
4622    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4623    #[doc = "Invalid SSID."]
4624    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4625    #[doc = "Invalid Password."]
4626    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4627}
4628impl WifiConfigApResponse {
4629    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4630}
4631impl Default for WifiConfigApResponse {
4632    fn default() -> Self {
4633        Self::DEFAULT
4634    }
4635}
4636#[cfg_attr(feature = "ts", derive(TS))]
4637#[cfg_attr(feature = "ts", ts(export))]
4638#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4640#[cfg_attr(feature = "serde", serde(tag = "type"))]
4641#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4642#[repr(u32)]
4643#[doc = "Winch actions."]
4644pub enum WinchActions {
4645    #[doc = "Allow motor to freewheel."]
4646    WINCH_RELAXED = 0,
4647    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4648    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4649    #[doc = "Wind or unwind line at specified rate."]
4650    WINCH_RATE_CONTROL = 2,
4651    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4652    WINCH_LOCK = 3,
4653    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4654    WINCH_DELIVER = 4,
4655    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4656    WINCH_HOLD = 5,
4657    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4658    WINCH_RETRACT = 6,
4659    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4660    WINCH_LOAD_LINE = 7,
4661    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4662    WINCH_ABANDON_LINE = 8,
4663    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4664    WINCH_LOAD_PAYLOAD = 9,
4665}
4666impl WinchActions {
4667    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4668}
4669impl Default for WinchActions {
4670    fn default() -> Self {
4671        Self::DEFAULT
4672    }
4673}
4674#[doc = "Set the vehicle attitude and body angular rates."]
4675#[doc = ""]
4676#[doc = "ID: 140"]
4677#[derive(Debug, Clone, PartialEq)]
4678#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4680#[cfg_attr(feature = "ts", derive(TS))]
4681#[cfg_attr(feature = "ts", ts(export))]
4682pub struct ACTUATOR_CONTROL_TARGET_DATA {
4683    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4684    pub time_usec: u64,
4685    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4686    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4687    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4688    pub controls: [f32; 8],
4689    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4690    pub group_mlx: u8,
4691}
4692impl ACTUATOR_CONTROL_TARGET_DATA {
4693    pub const ENCODED_LEN: usize = 41usize;
4694    pub const DEFAULT: Self = Self {
4695        time_usec: 0_u64,
4696        controls: [0.0_f32; 8usize],
4697        group_mlx: 0_u8,
4698    };
4699    #[cfg(feature = "arbitrary")]
4700    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4701        use arbitrary::{Arbitrary, Unstructured};
4702        let mut buf = [0u8; 1024];
4703        rng.fill_bytes(&mut buf);
4704        let mut unstructured = Unstructured::new(&buf);
4705        Self::arbitrary(&mut unstructured).unwrap_or_default()
4706    }
4707}
4708impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4709    fn default() -> Self {
4710        Self::DEFAULT.clone()
4711    }
4712}
4713impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4714    type Message = MavMessage;
4715    const ID: u32 = 140u32;
4716    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4717    const EXTRA_CRC: u8 = 181u8;
4718    const ENCODED_LEN: usize = 41usize;
4719    fn deser(
4720        _version: MavlinkVersion,
4721        __input: &[u8],
4722    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4723        let avail_len = __input.len();
4724        let mut payload_buf = [0; Self::ENCODED_LEN];
4725        let mut buf = if avail_len < Self::ENCODED_LEN {
4726            payload_buf[0..avail_len].copy_from_slice(__input);
4727            Bytes::new(&payload_buf)
4728        } else {
4729            Bytes::new(__input)
4730        };
4731        let mut __struct = Self::default();
4732        __struct.time_usec = buf.get_u64_le()?;
4733        for v in &mut __struct.controls {
4734            let val = buf.get_f32_le()?;
4735            *v = val;
4736        }
4737        __struct.group_mlx = buf.get_u8()?;
4738        Ok(__struct)
4739    }
4740    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4741        let mut __tmp = BytesMut::new(bytes);
4742        #[allow(clippy::absurd_extreme_comparisons)]
4743        #[allow(unused_comparisons)]
4744        if __tmp.remaining() < Self::ENCODED_LEN {
4745            panic!(
4746                "buffer is too small (need {} bytes, but got {})",
4747                Self::ENCODED_LEN,
4748                __tmp.remaining(),
4749            )
4750        }
4751        __tmp.put_u64_le(self.time_usec);
4752        for val in &self.controls {
4753            __tmp.put_f32_le(*val);
4754        }
4755        __tmp.put_u8(self.group_mlx);
4756        if matches!(version, MavlinkVersion::V2) {
4757            let len = __tmp.len();
4758            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4759        } else {
4760            __tmp.len()
4761        }
4762    }
4763}
4764#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4765#[doc = ""]
4766#[doc = "ID: 375"]
4767#[derive(Debug, Clone, PartialEq)]
4768#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4770#[cfg_attr(feature = "ts", derive(TS))]
4771#[cfg_attr(feature = "ts", ts(export))]
4772pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4773    #[doc = "Timestamp (since system boot)."]
4774    pub time_usec: u64,
4775    #[doc = "Active outputs"]
4776    pub active: u32,
4777    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4778    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4779    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4780    pub actuator: [f32; 32],
4781}
4782impl ACTUATOR_OUTPUT_STATUS_DATA {
4783    pub const ENCODED_LEN: usize = 140usize;
4784    pub const DEFAULT: Self = Self {
4785        time_usec: 0_u64,
4786        active: 0_u32,
4787        actuator: [0.0_f32; 32usize],
4788    };
4789    #[cfg(feature = "arbitrary")]
4790    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4791        use arbitrary::{Arbitrary, Unstructured};
4792        let mut buf = [0u8; 1024];
4793        rng.fill_bytes(&mut buf);
4794        let mut unstructured = Unstructured::new(&buf);
4795        Self::arbitrary(&mut unstructured).unwrap_or_default()
4796    }
4797}
4798impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4799    fn default() -> Self {
4800        Self::DEFAULT.clone()
4801    }
4802}
4803impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4804    type Message = MavMessage;
4805    const ID: u32 = 375u32;
4806    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4807    const EXTRA_CRC: u8 = 251u8;
4808    const ENCODED_LEN: usize = 140usize;
4809    fn deser(
4810        _version: MavlinkVersion,
4811        __input: &[u8],
4812    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4813        let avail_len = __input.len();
4814        let mut payload_buf = [0; Self::ENCODED_LEN];
4815        let mut buf = if avail_len < Self::ENCODED_LEN {
4816            payload_buf[0..avail_len].copy_from_slice(__input);
4817            Bytes::new(&payload_buf)
4818        } else {
4819            Bytes::new(__input)
4820        };
4821        let mut __struct = Self::default();
4822        __struct.time_usec = buf.get_u64_le()?;
4823        __struct.active = buf.get_u32_le()?;
4824        for v in &mut __struct.actuator {
4825            let val = buf.get_f32_le()?;
4826            *v = val;
4827        }
4828        Ok(__struct)
4829    }
4830    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4831        let mut __tmp = BytesMut::new(bytes);
4832        #[allow(clippy::absurd_extreme_comparisons)]
4833        #[allow(unused_comparisons)]
4834        if __tmp.remaining() < Self::ENCODED_LEN {
4835            panic!(
4836                "buffer is too small (need {} bytes, but got {})",
4837                Self::ENCODED_LEN,
4838                __tmp.remaining(),
4839            )
4840        }
4841        __tmp.put_u64_le(self.time_usec);
4842        __tmp.put_u32_le(self.active);
4843        for val in &self.actuator {
4844            __tmp.put_f32_le(*val);
4845        }
4846        if matches!(version, MavlinkVersion::V2) {
4847            let len = __tmp.len();
4848            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4849        } else {
4850            __tmp.len()
4851        }
4852    }
4853}
4854#[doc = "The location and information of an ADSB vehicle."]
4855#[doc = ""]
4856#[doc = "ID: 246"]
4857#[derive(Debug, Clone, PartialEq)]
4858#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4860#[cfg_attr(feature = "ts", derive(TS))]
4861#[cfg_attr(feature = "ts", ts(export))]
4862pub struct ADSB_VEHICLE_DATA {
4863    #[doc = "ICAO address"]
4864    pub ICAO_address: u32,
4865    #[doc = "Latitude"]
4866    pub lat: i32,
4867    #[doc = "Longitude"]
4868    pub lon: i32,
4869    #[doc = "Altitude(ASL)"]
4870    pub altitude: i32,
4871    #[doc = "Course over ground"]
4872    pub heading: u16,
4873    #[doc = "The horizontal velocity"]
4874    pub hor_velocity: u16,
4875    #[doc = "The vertical velocity. Positive is up"]
4876    pub ver_velocity: i16,
4877    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4878    pub flags: AdsbFlags,
4879    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4880    pub squawk: u16,
4881    #[doc = "ADSB altitude type."]
4882    pub altitude_type: AdsbAltitudeType,
4883    #[doc = "The callsign, 8+null"]
4884    #[cfg_attr(feature = "ts", ts(type = "string"))]
4885    pub callsign: CharArray<9>,
4886    #[doc = "ADSB emitter type."]
4887    pub emitter_type: AdsbEmitterType,
4888    #[doc = "Time since last communication in seconds"]
4889    pub tslc: u8,
4890}
4891impl ADSB_VEHICLE_DATA {
4892    pub const ENCODED_LEN: usize = 38usize;
4893    pub const DEFAULT: Self = Self {
4894        ICAO_address: 0_u32,
4895        lat: 0_i32,
4896        lon: 0_i32,
4897        altitude: 0_i32,
4898        heading: 0_u16,
4899        hor_velocity: 0_u16,
4900        ver_velocity: 0_i16,
4901        flags: AdsbFlags::DEFAULT,
4902        squawk: 0_u16,
4903        altitude_type: AdsbAltitudeType::DEFAULT,
4904        callsign: CharArray::new([0_u8; 9usize]),
4905        emitter_type: AdsbEmitterType::DEFAULT,
4906        tslc: 0_u8,
4907    };
4908    #[cfg(feature = "arbitrary")]
4909    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4910        use arbitrary::{Arbitrary, Unstructured};
4911        let mut buf = [0u8; 1024];
4912        rng.fill_bytes(&mut buf);
4913        let mut unstructured = Unstructured::new(&buf);
4914        Self::arbitrary(&mut unstructured).unwrap_or_default()
4915    }
4916}
4917impl Default for ADSB_VEHICLE_DATA {
4918    fn default() -> Self {
4919        Self::DEFAULT.clone()
4920    }
4921}
4922impl MessageData for ADSB_VEHICLE_DATA {
4923    type Message = MavMessage;
4924    const ID: u32 = 246u32;
4925    const NAME: &'static str = "ADSB_VEHICLE";
4926    const EXTRA_CRC: u8 = 184u8;
4927    const ENCODED_LEN: usize = 38usize;
4928    fn deser(
4929        _version: MavlinkVersion,
4930        __input: &[u8],
4931    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4932        let avail_len = __input.len();
4933        let mut payload_buf = [0; Self::ENCODED_LEN];
4934        let mut buf = if avail_len < Self::ENCODED_LEN {
4935            payload_buf[0..avail_len].copy_from_slice(__input);
4936            Bytes::new(&payload_buf)
4937        } else {
4938            Bytes::new(__input)
4939        };
4940        let mut __struct = Self::default();
4941        __struct.ICAO_address = buf.get_u32_le()?;
4942        __struct.lat = buf.get_i32_le()?;
4943        __struct.lon = buf.get_i32_le()?;
4944        __struct.altitude = buf.get_i32_le()?;
4945        __struct.heading = buf.get_u16_le()?;
4946        __struct.hor_velocity = buf.get_u16_le()?;
4947        __struct.ver_velocity = buf.get_i16_le()?;
4948        let tmp = buf.get_u16_le()?;
4949        __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
4950            ::mavlink_core::error::ParserError::InvalidFlag {
4951                flag_type: "AdsbFlags",
4952                value: tmp as u64,
4953            },
4954        )?;
4955        __struct.squawk = buf.get_u16_le()?;
4956        let tmp = buf.get_u8()?;
4957        __struct.altitude_type =
4958            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4959                enum_type: "AdsbAltitudeType",
4960                value: tmp as u64,
4961            })?;
4962        let mut tmp = [0_u8; 9usize];
4963        for v in &mut tmp {
4964            *v = buf.get_u8()?;
4965        }
4966        __struct.callsign = CharArray::new(tmp);
4967        let tmp = buf.get_u8()?;
4968        __struct.emitter_type =
4969            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4970                enum_type: "AdsbEmitterType",
4971                value: tmp as u64,
4972            })?;
4973        __struct.tslc = buf.get_u8()?;
4974        Ok(__struct)
4975    }
4976    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4977        let mut __tmp = BytesMut::new(bytes);
4978        #[allow(clippy::absurd_extreme_comparisons)]
4979        #[allow(unused_comparisons)]
4980        if __tmp.remaining() < Self::ENCODED_LEN {
4981            panic!(
4982                "buffer is too small (need {} bytes, but got {})",
4983                Self::ENCODED_LEN,
4984                __tmp.remaining(),
4985            )
4986        }
4987        __tmp.put_u32_le(self.ICAO_address);
4988        __tmp.put_i32_le(self.lat);
4989        __tmp.put_i32_le(self.lon);
4990        __tmp.put_i32_le(self.altitude);
4991        __tmp.put_u16_le(self.heading);
4992        __tmp.put_u16_le(self.hor_velocity);
4993        __tmp.put_i16_le(self.ver_velocity);
4994        __tmp.put_u16_le(self.flags.bits() as u16);
4995        __tmp.put_u16_le(self.squawk);
4996        __tmp.put_u8(self.altitude_type as u8);
4997        for val in &self.callsign {
4998            __tmp.put_u8(*val);
4999        }
5000        __tmp.put_u8(self.emitter_type as u8);
5001        __tmp.put_u8(self.tslc);
5002        if matches!(version, MavlinkVersion::V2) {
5003            let len = __tmp.len();
5004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5005        } else {
5006            __tmp.len()
5007        }
5008    }
5009}
5010#[doc = "The location and information of an AIS vessel."]
5011#[doc = ""]
5012#[doc = "ID: 301"]
5013#[derive(Debug, Clone, PartialEq)]
5014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5016#[cfg_attr(feature = "ts", derive(TS))]
5017#[cfg_attr(feature = "ts", ts(export))]
5018pub struct AIS_VESSEL_DATA {
5019    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5020    pub MMSI: u32,
5021    #[doc = "Latitude"]
5022    pub lat: i32,
5023    #[doc = "Longitude"]
5024    pub lon: i32,
5025    #[doc = "Course over ground"]
5026    pub COG: u16,
5027    #[doc = "True heading"]
5028    pub heading: u16,
5029    #[doc = "Speed over ground"]
5030    pub velocity: u16,
5031    #[doc = "Distance from lat/lon location to bow"]
5032    pub dimension_bow: u16,
5033    #[doc = "Distance from lat/lon location to stern"]
5034    pub dimension_stern: u16,
5035    #[doc = "Time since last communication in seconds"]
5036    pub tslc: u16,
5037    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5038    pub flags: AisFlags,
5039    #[doc = "Turn rate"]
5040    pub turn_rate: i8,
5041    #[doc = "Navigational status"]
5042    pub navigational_status: AisNavStatus,
5043    #[doc = "Type of vessels"]
5044    pub mavtype: AisType,
5045    #[doc = "Distance from lat/lon location to port side"]
5046    pub dimension_port: u8,
5047    #[doc = "Distance from lat/lon location to starboard side"]
5048    pub dimension_starboard: u8,
5049    #[doc = "The vessel callsign"]
5050    #[cfg_attr(feature = "ts", ts(type = "string"))]
5051    pub callsign: CharArray<7>,
5052    #[doc = "The vessel name"]
5053    #[cfg_attr(feature = "ts", ts(type = "string"))]
5054    pub name: CharArray<20>,
5055}
5056impl AIS_VESSEL_DATA {
5057    pub const ENCODED_LEN: usize = 58usize;
5058    pub const DEFAULT: Self = Self {
5059        MMSI: 0_u32,
5060        lat: 0_i32,
5061        lon: 0_i32,
5062        COG: 0_u16,
5063        heading: 0_u16,
5064        velocity: 0_u16,
5065        dimension_bow: 0_u16,
5066        dimension_stern: 0_u16,
5067        tslc: 0_u16,
5068        flags: AisFlags::DEFAULT,
5069        turn_rate: 0_i8,
5070        navigational_status: AisNavStatus::DEFAULT,
5071        mavtype: AisType::DEFAULT,
5072        dimension_port: 0_u8,
5073        dimension_starboard: 0_u8,
5074        callsign: CharArray::new([0_u8; 7usize]),
5075        name: CharArray::new([0_u8; 20usize]),
5076    };
5077    #[cfg(feature = "arbitrary")]
5078    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5079        use arbitrary::{Arbitrary, Unstructured};
5080        let mut buf = [0u8; 1024];
5081        rng.fill_bytes(&mut buf);
5082        let mut unstructured = Unstructured::new(&buf);
5083        Self::arbitrary(&mut unstructured).unwrap_or_default()
5084    }
5085}
5086impl Default for AIS_VESSEL_DATA {
5087    fn default() -> Self {
5088        Self::DEFAULT.clone()
5089    }
5090}
5091impl MessageData for AIS_VESSEL_DATA {
5092    type Message = MavMessage;
5093    const ID: u32 = 301u32;
5094    const NAME: &'static str = "AIS_VESSEL";
5095    const EXTRA_CRC: u8 = 243u8;
5096    const ENCODED_LEN: usize = 58usize;
5097    fn deser(
5098        _version: MavlinkVersion,
5099        __input: &[u8],
5100    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5101        let avail_len = __input.len();
5102        let mut payload_buf = [0; Self::ENCODED_LEN];
5103        let mut buf = if avail_len < Self::ENCODED_LEN {
5104            payload_buf[0..avail_len].copy_from_slice(__input);
5105            Bytes::new(&payload_buf)
5106        } else {
5107            Bytes::new(__input)
5108        };
5109        let mut __struct = Self::default();
5110        __struct.MMSI = buf.get_u32_le()?;
5111        __struct.lat = buf.get_i32_le()?;
5112        __struct.lon = buf.get_i32_le()?;
5113        __struct.COG = buf.get_u16_le()?;
5114        __struct.heading = buf.get_u16_le()?;
5115        __struct.velocity = buf.get_u16_le()?;
5116        __struct.dimension_bow = buf.get_u16_le()?;
5117        __struct.dimension_stern = buf.get_u16_le()?;
5118        __struct.tslc = buf.get_u16_le()?;
5119        let tmp = buf.get_u16_le()?;
5120        __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
5121            ::mavlink_core::error::ParserError::InvalidFlag {
5122                flag_type: "AisFlags",
5123                value: tmp as u64,
5124            },
5125        )?;
5126        __struct.turn_rate = buf.get_i8()?;
5127        let tmp = buf.get_u8()?;
5128        __struct.navigational_status =
5129            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5130                enum_type: "AisNavStatus",
5131                value: tmp as u64,
5132            })?;
5133        let tmp = buf.get_u8()?;
5134        __struct.mavtype =
5135            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5136                enum_type: "AisType",
5137                value: tmp as u64,
5138            })?;
5139        __struct.dimension_port = buf.get_u8()?;
5140        __struct.dimension_starboard = buf.get_u8()?;
5141        let mut tmp = [0_u8; 7usize];
5142        for v in &mut tmp {
5143            *v = buf.get_u8()?;
5144        }
5145        __struct.callsign = CharArray::new(tmp);
5146        let mut tmp = [0_u8; 20usize];
5147        for v in &mut tmp {
5148            *v = buf.get_u8()?;
5149        }
5150        __struct.name = CharArray::new(tmp);
5151        Ok(__struct)
5152    }
5153    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5154        let mut __tmp = BytesMut::new(bytes);
5155        #[allow(clippy::absurd_extreme_comparisons)]
5156        #[allow(unused_comparisons)]
5157        if __tmp.remaining() < Self::ENCODED_LEN {
5158            panic!(
5159                "buffer is too small (need {} bytes, but got {})",
5160                Self::ENCODED_LEN,
5161                __tmp.remaining(),
5162            )
5163        }
5164        __tmp.put_u32_le(self.MMSI);
5165        __tmp.put_i32_le(self.lat);
5166        __tmp.put_i32_le(self.lon);
5167        __tmp.put_u16_le(self.COG);
5168        __tmp.put_u16_le(self.heading);
5169        __tmp.put_u16_le(self.velocity);
5170        __tmp.put_u16_le(self.dimension_bow);
5171        __tmp.put_u16_le(self.dimension_stern);
5172        __tmp.put_u16_le(self.tslc);
5173        __tmp.put_u16_le(self.flags.bits() as u16);
5174        __tmp.put_i8(self.turn_rate);
5175        __tmp.put_u8(self.navigational_status as u8);
5176        __tmp.put_u8(self.mavtype as u8);
5177        __tmp.put_u8(self.dimension_port);
5178        __tmp.put_u8(self.dimension_starboard);
5179        for val in &self.callsign {
5180            __tmp.put_u8(*val);
5181        }
5182        for val in &self.name {
5183            __tmp.put_u8(*val);
5184        }
5185        if matches!(version, MavlinkVersion::V2) {
5186            let len = __tmp.len();
5187            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5188        } else {
5189            __tmp.len()
5190        }
5191    }
5192}
5193#[doc = "The current system altitude."]
5194#[doc = ""]
5195#[doc = "ID: 141"]
5196#[derive(Debug, Clone, PartialEq)]
5197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5199#[cfg_attr(feature = "ts", derive(TS))]
5200#[cfg_attr(feature = "ts", ts(export))]
5201pub struct ALTITUDE_DATA {
5202    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5203    pub time_usec: u64,
5204    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5205    pub altitude_monotonic: f32,
5206    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5207    pub altitude_amsl: f32,
5208    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5209    pub altitude_local: f32,
5210    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5211    pub altitude_relative: f32,
5212    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5213    pub altitude_terrain: f32,
5214    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5215    pub bottom_clearance: f32,
5216}
5217impl ALTITUDE_DATA {
5218    pub const ENCODED_LEN: usize = 32usize;
5219    pub const DEFAULT: Self = Self {
5220        time_usec: 0_u64,
5221        altitude_monotonic: 0.0_f32,
5222        altitude_amsl: 0.0_f32,
5223        altitude_local: 0.0_f32,
5224        altitude_relative: 0.0_f32,
5225        altitude_terrain: 0.0_f32,
5226        bottom_clearance: 0.0_f32,
5227    };
5228    #[cfg(feature = "arbitrary")]
5229    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5230        use arbitrary::{Arbitrary, Unstructured};
5231        let mut buf = [0u8; 1024];
5232        rng.fill_bytes(&mut buf);
5233        let mut unstructured = Unstructured::new(&buf);
5234        Self::arbitrary(&mut unstructured).unwrap_or_default()
5235    }
5236}
5237impl Default for ALTITUDE_DATA {
5238    fn default() -> Self {
5239        Self::DEFAULT.clone()
5240    }
5241}
5242impl MessageData for ALTITUDE_DATA {
5243    type Message = MavMessage;
5244    const ID: u32 = 141u32;
5245    const NAME: &'static str = "ALTITUDE";
5246    const EXTRA_CRC: u8 = 47u8;
5247    const ENCODED_LEN: usize = 32usize;
5248    fn deser(
5249        _version: MavlinkVersion,
5250        __input: &[u8],
5251    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5252        let avail_len = __input.len();
5253        let mut payload_buf = [0; Self::ENCODED_LEN];
5254        let mut buf = if avail_len < Self::ENCODED_LEN {
5255            payload_buf[0..avail_len].copy_from_slice(__input);
5256            Bytes::new(&payload_buf)
5257        } else {
5258            Bytes::new(__input)
5259        };
5260        let mut __struct = Self::default();
5261        __struct.time_usec = buf.get_u64_le()?;
5262        __struct.altitude_monotonic = buf.get_f32_le()?;
5263        __struct.altitude_amsl = buf.get_f32_le()?;
5264        __struct.altitude_local = buf.get_f32_le()?;
5265        __struct.altitude_relative = buf.get_f32_le()?;
5266        __struct.altitude_terrain = buf.get_f32_le()?;
5267        __struct.bottom_clearance = buf.get_f32_le()?;
5268        Ok(__struct)
5269    }
5270    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5271        let mut __tmp = BytesMut::new(bytes);
5272        #[allow(clippy::absurd_extreme_comparisons)]
5273        #[allow(unused_comparisons)]
5274        if __tmp.remaining() < Self::ENCODED_LEN {
5275            panic!(
5276                "buffer is too small (need {} bytes, but got {})",
5277                Self::ENCODED_LEN,
5278                __tmp.remaining(),
5279            )
5280        }
5281        __tmp.put_u64_le(self.time_usec);
5282        __tmp.put_f32_le(self.altitude_monotonic);
5283        __tmp.put_f32_le(self.altitude_amsl);
5284        __tmp.put_f32_le(self.altitude_local);
5285        __tmp.put_f32_le(self.altitude_relative);
5286        __tmp.put_f32_le(self.altitude_terrain);
5287        __tmp.put_f32_le(self.bottom_clearance);
5288        if matches!(version, MavlinkVersion::V2) {
5289            let len = __tmp.len();
5290            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5291        } else {
5292            __tmp.len()
5293        }
5294    }
5295}
5296#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5297#[doc = ""]
5298#[doc = "ID: 30"]
5299#[derive(Debug, Clone, PartialEq)]
5300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5301#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5302#[cfg_attr(feature = "ts", derive(TS))]
5303#[cfg_attr(feature = "ts", ts(export))]
5304pub struct ATTITUDE_DATA {
5305    #[doc = "Timestamp (time since system boot)."]
5306    pub time_boot_ms: u32,
5307    #[doc = "Roll angle (-pi..+pi)"]
5308    pub roll: f32,
5309    #[doc = "Pitch angle (-pi..+pi)"]
5310    pub pitch: f32,
5311    #[doc = "Yaw angle (-pi..+pi)"]
5312    pub yaw: f32,
5313    #[doc = "Roll angular speed"]
5314    pub rollspeed: f32,
5315    #[doc = "Pitch angular speed"]
5316    pub pitchspeed: f32,
5317    #[doc = "Yaw angular speed"]
5318    pub yawspeed: f32,
5319}
5320impl ATTITUDE_DATA {
5321    pub const ENCODED_LEN: usize = 28usize;
5322    pub const DEFAULT: Self = Self {
5323        time_boot_ms: 0_u32,
5324        roll: 0.0_f32,
5325        pitch: 0.0_f32,
5326        yaw: 0.0_f32,
5327        rollspeed: 0.0_f32,
5328        pitchspeed: 0.0_f32,
5329        yawspeed: 0.0_f32,
5330    };
5331    #[cfg(feature = "arbitrary")]
5332    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5333        use arbitrary::{Arbitrary, Unstructured};
5334        let mut buf = [0u8; 1024];
5335        rng.fill_bytes(&mut buf);
5336        let mut unstructured = Unstructured::new(&buf);
5337        Self::arbitrary(&mut unstructured).unwrap_or_default()
5338    }
5339}
5340impl Default for ATTITUDE_DATA {
5341    fn default() -> Self {
5342        Self::DEFAULT.clone()
5343    }
5344}
5345impl MessageData for ATTITUDE_DATA {
5346    type Message = MavMessage;
5347    const ID: u32 = 30u32;
5348    const NAME: &'static str = "ATTITUDE";
5349    const EXTRA_CRC: u8 = 39u8;
5350    const ENCODED_LEN: usize = 28usize;
5351    fn deser(
5352        _version: MavlinkVersion,
5353        __input: &[u8],
5354    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5355        let avail_len = __input.len();
5356        let mut payload_buf = [0; Self::ENCODED_LEN];
5357        let mut buf = if avail_len < Self::ENCODED_LEN {
5358            payload_buf[0..avail_len].copy_from_slice(__input);
5359            Bytes::new(&payload_buf)
5360        } else {
5361            Bytes::new(__input)
5362        };
5363        let mut __struct = Self::default();
5364        __struct.time_boot_ms = buf.get_u32_le()?;
5365        __struct.roll = buf.get_f32_le()?;
5366        __struct.pitch = buf.get_f32_le()?;
5367        __struct.yaw = buf.get_f32_le()?;
5368        __struct.rollspeed = buf.get_f32_le()?;
5369        __struct.pitchspeed = buf.get_f32_le()?;
5370        __struct.yawspeed = buf.get_f32_le()?;
5371        Ok(__struct)
5372    }
5373    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5374        let mut __tmp = BytesMut::new(bytes);
5375        #[allow(clippy::absurd_extreme_comparisons)]
5376        #[allow(unused_comparisons)]
5377        if __tmp.remaining() < Self::ENCODED_LEN {
5378            panic!(
5379                "buffer is too small (need {} bytes, but got {})",
5380                Self::ENCODED_LEN,
5381                __tmp.remaining(),
5382            )
5383        }
5384        __tmp.put_u32_le(self.time_boot_ms);
5385        __tmp.put_f32_le(self.roll);
5386        __tmp.put_f32_le(self.pitch);
5387        __tmp.put_f32_le(self.yaw);
5388        __tmp.put_f32_le(self.rollspeed);
5389        __tmp.put_f32_le(self.pitchspeed);
5390        __tmp.put_f32_le(self.yawspeed);
5391        if matches!(version, MavlinkVersion::V2) {
5392            let len = __tmp.len();
5393            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5394        } else {
5395            __tmp.len()
5396        }
5397    }
5398}
5399#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5400#[doc = ""]
5401#[doc = "ID: 31"]
5402#[derive(Debug, Clone, PartialEq)]
5403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5404#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5405#[cfg_attr(feature = "ts", derive(TS))]
5406#[cfg_attr(feature = "ts", ts(export))]
5407pub struct ATTITUDE_QUATERNION_DATA {
5408    #[doc = "Timestamp (time since system boot)."]
5409    pub time_boot_ms: u32,
5410    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5411    pub q1: f32,
5412    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5413    pub q2: f32,
5414    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5415    pub q3: f32,
5416    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5417    pub q4: f32,
5418    #[doc = "Roll angular speed"]
5419    pub rollspeed: f32,
5420    #[doc = "Pitch angular speed"]
5421    pub pitchspeed: f32,
5422    #[doc = "Yaw angular speed"]
5423    pub yawspeed: f32,
5424    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5425    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5426    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5427    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5428    pub repr_offset_q: [f32; 4],
5429}
5430impl ATTITUDE_QUATERNION_DATA {
5431    pub const ENCODED_LEN: usize = 48usize;
5432    pub const DEFAULT: Self = Self {
5433        time_boot_ms: 0_u32,
5434        q1: 0.0_f32,
5435        q2: 0.0_f32,
5436        q3: 0.0_f32,
5437        q4: 0.0_f32,
5438        rollspeed: 0.0_f32,
5439        pitchspeed: 0.0_f32,
5440        yawspeed: 0.0_f32,
5441        repr_offset_q: [0.0_f32; 4usize],
5442    };
5443    #[cfg(feature = "arbitrary")]
5444    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5445        use arbitrary::{Arbitrary, Unstructured};
5446        let mut buf = [0u8; 1024];
5447        rng.fill_bytes(&mut buf);
5448        let mut unstructured = Unstructured::new(&buf);
5449        Self::arbitrary(&mut unstructured).unwrap_or_default()
5450    }
5451}
5452impl Default for ATTITUDE_QUATERNION_DATA {
5453    fn default() -> Self {
5454        Self::DEFAULT.clone()
5455    }
5456}
5457impl MessageData for ATTITUDE_QUATERNION_DATA {
5458    type Message = MavMessage;
5459    const ID: u32 = 31u32;
5460    const NAME: &'static str = "ATTITUDE_QUATERNION";
5461    const EXTRA_CRC: u8 = 246u8;
5462    const ENCODED_LEN: usize = 48usize;
5463    fn deser(
5464        _version: MavlinkVersion,
5465        __input: &[u8],
5466    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5467        let avail_len = __input.len();
5468        let mut payload_buf = [0; Self::ENCODED_LEN];
5469        let mut buf = if avail_len < Self::ENCODED_LEN {
5470            payload_buf[0..avail_len].copy_from_slice(__input);
5471            Bytes::new(&payload_buf)
5472        } else {
5473            Bytes::new(__input)
5474        };
5475        let mut __struct = Self::default();
5476        __struct.time_boot_ms = buf.get_u32_le()?;
5477        __struct.q1 = buf.get_f32_le()?;
5478        __struct.q2 = buf.get_f32_le()?;
5479        __struct.q3 = buf.get_f32_le()?;
5480        __struct.q4 = buf.get_f32_le()?;
5481        __struct.rollspeed = buf.get_f32_le()?;
5482        __struct.pitchspeed = buf.get_f32_le()?;
5483        __struct.yawspeed = buf.get_f32_le()?;
5484        for v in &mut __struct.repr_offset_q {
5485            let val = buf.get_f32_le()?;
5486            *v = val;
5487        }
5488        Ok(__struct)
5489    }
5490    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5491        let mut __tmp = BytesMut::new(bytes);
5492        #[allow(clippy::absurd_extreme_comparisons)]
5493        #[allow(unused_comparisons)]
5494        if __tmp.remaining() < Self::ENCODED_LEN {
5495            panic!(
5496                "buffer is too small (need {} bytes, but got {})",
5497                Self::ENCODED_LEN,
5498                __tmp.remaining(),
5499            )
5500        }
5501        __tmp.put_u32_le(self.time_boot_ms);
5502        __tmp.put_f32_le(self.q1);
5503        __tmp.put_f32_le(self.q2);
5504        __tmp.put_f32_le(self.q3);
5505        __tmp.put_f32_le(self.q4);
5506        __tmp.put_f32_le(self.rollspeed);
5507        __tmp.put_f32_le(self.pitchspeed);
5508        __tmp.put_f32_le(self.yawspeed);
5509        if matches!(version, MavlinkVersion::V2) {
5510            for val in &self.repr_offset_q {
5511                __tmp.put_f32_le(*val);
5512            }
5513            let len = __tmp.len();
5514            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5515        } else {
5516            __tmp.len()
5517        }
5518    }
5519}
5520#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5521#[doc = ""]
5522#[doc = "ID: 61"]
5523#[derive(Debug, Clone, PartialEq)]
5524#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5525#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5526#[cfg_attr(feature = "ts", derive(TS))]
5527#[cfg_attr(feature = "ts", ts(export))]
5528pub struct ATTITUDE_QUATERNION_COV_DATA {
5529    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5530    pub time_usec: u64,
5531    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5532    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5533    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5534    pub q: [f32; 4],
5535    #[doc = "Roll angular speed"]
5536    pub rollspeed: f32,
5537    #[doc = "Pitch angular speed"]
5538    pub pitchspeed: f32,
5539    #[doc = "Yaw angular speed"]
5540    pub yawspeed: f32,
5541    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5542    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5543    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5544    pub covariance: [f32; 9],
5545}
5546impl ATTITUDE_QUATERNION_COV_DATA {
5547    pub const ENCODED_LEN: usize = 72usize;
5548    pub const DEFAULT: Self = Self {
5549        time_usec: 0_u64,
5550        q: [0.0_f32; 4usize],
5551        rollspeed: 0.0_f32,
5552        pitchspeed: 0.0_f32,
5553        yawspeed: 0.0_f32,
5554        covariance: [0.0_f32; 9usize],
5555    };
5556    #[cfg(feature = "arbitrary")]
5557    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5558        use arbitrary::{Arbitrary, Unstructured};
5559        let mut buf = [0u8; 1024];
5560        rng.fill_bytes(&mut buf);
5561        let mut unstructured = Unstructured::new(&buf);
5562        Self::arbitrary(&mut unstructured).unwrap_or_default()
5563    }
5564}
5565impl Default for ATTITUDE_QUATERNION_COV_DATA {
5566    fn default() -> Self {
5567        Self::DEFAULT.clone()
5568    }
5569}
5570impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5571    type Message = MavMessage;
5572    const ID: u32 = 61u32;
5573    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5574    const EXTRA_CRC: u8 = 167u8;
5575    const ENCODED_LEN: usize = 72usize;
5576    fn deser(
5577        _version: MavlinkVersion,
5578        __input: &[u8],
5579    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5580        let avail_len = __input.len();
5581        let mut payload_buf = [0; Self::ENCODED_LEN];
5582        let mut buf = if avail_len < Self::ENCODED_LEN {
5583            payload_buf[0..avail_len].copy_from_slice(__input);
5584            Bytes::new(&payload_buf)
5585        } else {
5586            Bytes::new(__input)
5587        };
5588        let mut __struct = Self::default();
5589        __struct.time_usec = buf.get_u64_le()?;
5590        for v in &mut __struct.q {
5591            let val = buf.get_f32_le()?;
5592            *v = val;
5593        }
5594        __struct.rollspeed = buf.get_f32_le()?;
5595        __struct.pitchspeed = buf.get_f32_le()?;
5596        __struct.yawspeed = buf.get_f32_le()?;
5597        for v in &mut __struct.covariance {
5598            let val = buf.get_f32_le()?;
5599            *v = val;
5600        }
5601        Ok(__struct)
5602    }
5603    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5604        let mut __tmp = BytesMut::new(bytes);
5605        #[allow(clippy::absurd_extreme_comparisons)]
5606        #[allow(unused_comparisons)]
5607        if __tmp.remaining() < Self::ENCODED_LEN {
5608            panic!(
5609                "buffer is too small (need {} bytes, but got {})",
5610                Self::ENCODED_LEN,
5611                __tmp.remaining(),
5612            )
5613        }
5614        __tmp.put_u64_le(self.time_usec);
5615        for val in &self.q {
5616            __tmp.put_f32_le(*val);
5617        }
5618        __tmp.put_f32_le(self.rollspeed);
5619        __tmp.put_f32_le(self.pitchspeed);
5620        __tmp.put_f32_le(self.yawspeed);
5621        for val in &self.covariance {
5622            __tmp.put_f32_le(*val);
5623        }
5624        if matches!(version, MavlinkVersion::V2) {
5625            let len = __tmp.len();
5626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5627        } else {
5628            __tmp.len()
5629        }
5630    }
5631}
5632#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5633#[doc = ""]
5634#[doc = "ID: 83"]
5635#[derive(Debug, Clone, PartialEq)]
5636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5638#[cfg_attr(feature = "ts", derive(TS))]
5639#[cfg_attr(feature = "ts", ts(export))]
5640pub struct ATTITUDE_TARGET_DATA {
5641    #[doc = "Timestamp (time since system boot)."]
5642    pub time_boot_ms: u32,
5643    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5644    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5645    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5646    pub q: [f32; 4],
5647    #[doc = "Body roll rate"]
5648    pub body_roll_rate: f32,
5649    #[doc = "Body pitch rate"]
5650    pub body_pitch_rate: f32,
5651    #[doc = "Body yaw rate"]
5652    pub body_yaw_rate: f32,
5653    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5654    pub thrust: f32,
5655    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5656    pub type_mask: AttitudeTargetTypemask,
5657}
5658impl ATTITUDE_TARGET_DATA {
5659    pub const ENCODED_LEN: usize = 37usize;
5660    pub const DEFAULT: Self = Self {
5661        time_boot_ms: 0_u32,
5662        q: [0.0_f32; 4usize],
5663        body_roll_rate: 0.0_f32,
5664        body_pitch_rate: 0.0_f32,
5665        body_yaw_rate: 0.0_f32,
5666        thrust: 0.0_f32,
5667        type_mask: AttitudeTargetTypemask::DEFAULT,
5668    };
5669    #[cfg(feature = "arbitrary")]
5670    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5671        use arbitrary::{Arbitrary, Unstructured};
5672        let mut buf = [0u8; 1024];
5673        rng.fill_bytes(&mut buf);
5674        let mut unstructured = Unstructured::new(&buf);
5675        Self::arbitrary(&mut unstructured).unwrap_or_default()
5676    }
5677}
5678impl Default for ATTITUDE_TARGET_DATA {
5679    fn default() -> Self {
5680        Self::DEFAULT.clone()
5681    }
5682}
5683impl MessageData for ATTITUDE_TARGET_DATA {
5684    type Message = MavMessage;
5685    const ID: u32 = 83u32;
5686    const NAME: &'static str = "ATTITUDE_TARGET";
5687    const EXTRA_CRC: u8 = 22u8;
5688    const ENCODED_LEN: usize = 37usize;
5689    fn deser(
5690        _version: MavlinkVersion,
5691        __input: &[u8],
5692    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5693        let avail_len = __input.len();
5694        let mut payload_buf = [0; Self::ENCODED_LEN];
5695        let mut buf = if avail_len < Self::ENCODED_LEN {
5696            payload_buf[0..avail_len].copy_from_slice(__input);
5697            Bytes::new(&payload_buf)
5698        } else {
5699            Bytes::new(__input)
5700        };
5701        let mut __struct = Self::default();
5702        __struct.time_boot_ms = buf.get_u32_le()?;
5703        for v in &mut __struct.q {
5704            let val = buf.get_f32_le()?;
5705            *v = val;
5706        }
5707        __struct.body_roll_rate = buf.get_f32_le()?;
5708        __struct.body_pitch_rate = buf.get_f32_le()?;
5709        __struct.body_yaw_rate = buf.get_f32_le()?;
5710        __struct.thrust = buf.get_f32_le()?;
5711        let tmp = buf.get_u8()?;
5712        __struct.type_mask =
5713            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
5714                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5715                    flag_type: "AttitudeTargetTypemask",
5716                    value: tmp as u64,
5717                })?;
5718        Ok(__struct)
5719    }
5720    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5721        let mut __tmp = BytesMut::new(bytes);
5722        #[allow(clippy::absurd_extreme_comparisons)]
5723        #[allow(unused_comparisons)]
5724        if __tmp.remaining() < Self::ENCODED_LEN {
5725            panic!(
5726                "buffer is too small (need {} bytes, but got {})",
5727                Self::ENCODED_LEN,
5728                __tmp.remaining(),
5729            )
5730        }
5731        __tmp.put_u32_le(self.time_boot_ms);
5732        for val in &self.q {
5733            __tmp.put_f32_le(*val);
5734        }
5735        __tmp.put_f32_le(self.body_roll_rate);
5736        __tmp.put_f32_le(self.body_pitch_rate);
5737        __tmp.put_f32_le(self.body_yaw_rate);
5738        __tmp.put_f32_le(self.thrust);
5739        __tmp.put_u8(self.type_mask.bits() as u8);
5740        if matches!(version, MavlinkVersion::V2) {
5741            let len = __tmp.len();
5742            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5743        } else {
5744            __tmp.len()
5745        }
5746    }
5747}
5748#[doc = "Motion capture attitude and position."]
5749#[doc = ""]
5750#[doc = "ID: 138"]
5751#[derive(Debug, Clone, PartialEq)]
5752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5753#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5754#[cfg_attr(feature = "ts", derive(TS))]
5755#[cfg_attr(feature = "ts", ts(export))]
5756pub struct ATT_POS_MOCAP_DATA {
5757    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5758    pub time_usec: u64,
5759    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5760    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5761    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5762    pub q: [f32; 4],
5763    #[doc = "X position (NED)"]
5764    pub x: f32,
5765    #[doc = "Y position (NED)"]
5766    pub y: f32,
5767    #[doc = "Z position (NED)"]
5768    pub z: f32,
5769    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5770    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5771    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5772    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5773    pub covariance: [f32; 21],
5774}
5775impl ATT_POS_MOCAP_DATA {
5776    pub const ENCODED_LEN: usize = 120usize;
5777    pub const DEFAULT: Self = Self {
5778        time_usec: 0_u64,
5779        q: [0.0_f32; 4usize],
5780        x: 0.0_f32,
5781        y: 0.0_f32,
5782        z: 0.0_f32,
5783        covariance: [0.0_f32; 21usize],
5784    };
5785    #[cfg(feature = "arbitrary")]
5786    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5787        use arbitrary::{Arbitrary, Unstructured};
5788        let mut buf = [0u8; 1024];
5789        rng.fill_bytes(&mut buf);
5790        let mut unstructured = Unstructured::new(&buf);
5791        Self::arbitrary(&mut unstructured).unwrap_or_default()
5792    }
5793}
5794impl Default for ATT_POS_MOCAP_DATA {
5795    fn default() -> Self {
5796        Self::DEFAULT.clone()
5797    }
5798}
5799impl MessageData for ATT_POS_MOCAP_DATA {
5800    type Message = MavMessage;
5801    const ID: u32 = 138u32;
5802    const NAME: &'static str = "ATT_POS_MOCAP";
5803    const EXTRA_CRC: u8 = 109u8;
5804    const ENCODED_LEN: usize = 120usize;
5805    fn deser(
5806        _version: MavlinkVersion,
5807        __input: &[u8],
5808    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5809        let avail_len = __input.len();
5810        let mut payload_buf = [0; Self::ENCODED_LEN];
5811        let mut buf = if avail_len < Self::ENCODED_LEN {
5812            payload_buf[0..avail_len].copy_from_slice(__input);
5813            Bytes::new(&payload_buf)
5814        } else {
5815            Bytes::new(__input)
5816        };
5817        let mut __struct = Self::default();
5818        __struct.time_usec = buf.get_u64_le()?;
5819        for v in &mut __struct.q {
5820            let val = buf.get_f32_le()?;
5821            *v = val;
5822        }
5823        __struct.x = buf.get_f32_le()?;
5824        __struct.y = buf.get_f32_le()?;
5825        __struct.z = buf.get_f32_le()?;
5826        for v in &mut __struct.covariance {
5827            let val = buf.get_f32_le()?;
5828            *v = val;
5829        }
5830        Ok(__struct)
5831    }
5832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5833        let mut __tmp = BytesMut::new(bytes);
5834        #[allow(clippy::absurd_extreme_comparisons)]
5835        #[allow(unused_comparisons)]
5836        if __tmp.remaining() < Self::ENCODED_LEN {
5837            panic!(
5838                "buffer is too small (need {} bytes, but got {})",
5839                Self::ENCODED_LEN,
5840                __tmp.remaining(),
5841            )
5842        }
5843        __tmp.put_u64_le(self.time_usec);
5844        for val in &self.q {
5845            __tmp.put_f32_le(*val);
5846        }
5847        __tmp.put_f32_le(self.x);
5848        __tmp.put_f32_le(self.y);
5849        __tmp.put_f32_le(self.z);
5850        if matches!(version, MavlinkVersion::V2) {
5851            for val in &self.covariance {
5852                __tmp.put_f32_le(*val);
5853            }
5854            let len = __tmp.len();
5855            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5856        } else {
5857            __tmp.len()
5858        }
5859    }
5860}
5861#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5862#[doc = ""]
5863#[doc = "ID: 7"]
5864#[derive(Debug, Clone, PartialEq)]
5865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5867#[cfg_attr(feature = "ts", derive(TS))]
5868#[cfg_attr(feature = "ts", ts(export))]
5869pub struct AUTH_KEY_DATA {
5870    #[doc = "key"]
5871    #[cfg_attr(feature = "ts", ts(type = "string"))]
5872    pub key: CharArray<32>,
5873}
5874impl AUTH_KEY_DATA {
5875    pub const ENCODED_LEN: usize = 32usize;
5876    pub const DEFAULT: Self = Self {
5877        key: CharArray::new([0_u8; 32usize]),
5878    };
5879    #[cfg(feature = "arbitrary")]
5880    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5881        use arbitrary::{Arbitrary, Unstructured};
5882        let mut buf = [0u8; 1024];
5883        rng.fill_bytes(&mut buf);
5884        let mut unstructured = Unstructured::new(&buf);
5885        Self::arbitrary(&mut unstructured).unwrap_or_default()
5886    }
5887}
5888impl Default for AUTH_KEY_DATA {
5889    fn default() -> Self {
5890        Self::DEFAULT.clone()
5891    }
5892}
5893impl MessageData for AUTH_KEY_DATA {
5894    type Message = MavMessage;
5895    const ID: u32 = 7u32;
5896    const NAME: &'static str = "AUTH_KEY";
5897    const EXTRA_CRC: u8 = 119u8;
5898    const ENCODED_LEN: usize = 32usize;
5899    fn deser(
5900        _version: MavlinkVersion,
5901        __input: &[u8],
5902    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5903        let avail_len = __input.len();
5904        let mut payload_buf = [0; Self::ENCODED_LEN];
5905        let mut buf = if avail_len < Self::ENCODED_LEN {
5906            payload_buf[0..avail_len].copy_from_slice(__input);
5907            Bytes::new(&payload_buf)
5908        } else {
5909            Bytes::new(__input)
5910        };
5911        let mut __struct = Self::default();
5912        let mut tmp = [0_u8; 32usize];
5913        for v in &mut tmp {
5914            *v = buf.get_u8()?;
5915        }
5916        __struct.key = CharArray::new(tmp);
5917        Ok(__struct)
5918    }
5919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5920        let mut __tmp = BytesMut::new(bytes);
5921        #[allow(clippy::absurd_extreme_comparisons)]
5922        #[allow(unused_comparisons)]
5923        if __tmp.remaining() < Self::ENCODED_LEN {
5924            panic!(
5925                "buffer is too small (need {} bytes, but got {})",
5926                Self::ENCODED_LEN,
5927                __tmp.remaining(),
5928            )
5929        }
5930        for val in &self.key {
5931            __tmp.put_u8(*val);
5932        }
5933        if matches!(version, MavlinkVersion::V2) {
5934            let len = __tmp.len();
5935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5936        } else {
5937            __tmp.len()
5938        }
5939    }
5940}
5941#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5942#[doc = ""]
5943#[doc = "ID: 286"]
5944#[derive(Debug, Clone, PartialEq)]
5945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5947#[cfg_attr(feature = "ts", derive(TS))]
5948#[cfg_attr(feature = "ts", ts(export))]
5949pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5950    #[doc = "Timestamp (time since system boot)."]
5951    pub time_boot_us: u64,
5952    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5953    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5954    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5955    pub q: [f32; 4],
5956    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5957    pub q_estimated_delay_us: u32,
5958    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5959    pub vx: f32,
5960    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5961    pub vy: f32,
5962    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5963    pub vz: f32,
5964    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5965    pub v_estimated_delay_us: u32,
5966    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5967    pub feed_forward_angular_velocity_z: f32,
5968    #[doc = "Bitmap indicating which estimator outputs are valid."]
5969    pub estimator_status: EstimatorStatusFlags,
5970    #[doc = "System ID"]
5971    pub target_system: u8,
5972    #[doc = "Component ID"]
5973    pub target_component: u8,
5974    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5975    pub landed_state: MavLandedState,
5976    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
5977    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5978    pub angular_velocity_z: f32,
5979}
5980impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5981    pub const ENCODED_LEN: usize = 57usize;
5982    pub const DEFAULT: Self = Self {
5983        time_boot_us: 0_u64,
5984        q: [0.0_f32; 4usize],
5985        q_estimated_delay_us: 0_u32,
5986        vx: 0.0_f32,
5987        vy: 0.0_f32,
5988        vz: 0.0_f32,
5989        v_estimated_delay_us: 0_u32,
5990        feed_forward_angular_velocity_z: 0.0_f32,
5991        estimator_status: EstimatorStatusFlags::DEFAULT,
5992        target_system: 0_u8,
5993        target_component: 0_u8,
5994        landed_state: MavLandedState::DEFAULT,
5995        angular_velocity_z: 0.0_f32,
5996    };
5997    #[cfg(feature = "arbitrary")]
5998    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5999        use arbitrary::{Arbitrary, Unstructured};
6000        let mut buf = [0u8; 1024];
6001        rng.fill_bytes(&mut buf);
6002        let mut unstructured = Unstructured::new(&buf);
6003        Self::arbitrary(&mut unstructured).unwrap_or_default()
6004    }
6005}
6006impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6007    fn default() -> Self {
6008        Self::DEFAULT.clone()
6009    }
6010}
6011impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6012    type Message = MavMessage;
6013    const ID: u32 = 286u32;
6014    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6015    const EXTRA_CRC: u8 = 210u8;
6016    const ENCODED_LEN: usize = 57usize;
6017    fn deser(
6018        _version: MavlinkVersion,
6019        __input: &[u8],
6020    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6021        let avail_len = __input.len();
6022        let mut payload_buf = [0; Self::ENCODED_LEN];
6023        let mut buf = if avail_len < Self::ENCODED_LEN {
6024            payload_buf[0..avail_len].copy_from_slice(__input);
6025            Bytes::new(&payload_buf)
6026        } else {
6027            Bytes::new(__input)
6028        };
6029        let mut __struct = Self::default();
6030        __struct.time_boot_us = buf.get_u64_le()?;
6031        for v in &mut __struct.q {
6032            let val = buf.get_f32_le()?;
6033            *v = val;
6034        }
6035        __struct.q_estimated_delay_us = buf.get_u32_le()?;
6036        __struct.vx = buf.get_f32_le()?;
6037        __struct.vy = buf.get_f32_le()?;
6038        __struct.vz = buf.get_f32_le()?;
6039        __struct.v_estimated_delay_us = buf.get_u32_le()?;
6040        __struct.feed_forward_angular_velocity_z = buf.get_f32_le()?;
6041        let tmp = buf.get_u16_le()?;
6042        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6043            tmp as <EstimatorStatusFlags as Flags>::Bits,
6044        )
6045        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6046            flag_type: "EstimatorStatusFlags",
6047            value: tmp as u64,
6048        })?;
6049        __struct.target_system = buf.get_u8()?;
6050        __struct.target_component = buf.get_u8()?;
6051        let tmp = buf.get_u8()?;
6052        __struct.landed_state =
6053            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6054                enum_type: "MavLandedState",
6055                value: tmp as u64,
6056            })?;
6057        __struct.angular_velocity_z = buf.get_f32_le()?;
6058        Ok(__struct)
6059    }
6060    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6061        let mut __tmp = BytesMut::new(bytes);
6062        #[allow(clippy::absurd_extreme_comparisons)]
6063        #[allow(unused_comparisons)]
6064        if __tmp.remaining() < Self::ENCODED_LEN {
6065            panic!(
6066                "buffer is too small (need {} bytes, but got {})",
6067                Self::ENCODED_LEN,
6068                __tmp.remaining(),
6069            )
6070        }
6071        __tmp.put_u64_le(self.time_boot_us);
6072        for val in &self.q {
6073            __tmp.put_f32_le(*val);
6074        }
6075        __tmp.put_u32_le(self.q_estimated_delay_us);
6076        __tmp.put_f32_le(self.vx);
6077        __tmp.put_f32_le(self.vy);
6078        __tmp.put_f32_le(self.vz);
6079        __tmp.put_u32_le(self.v_estimated_delay_us);
6080        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6081        __tmp.put_u16_le(self.estimator_status.bits() as u16);
6082        __tmp.put_u8(self.target_system);
6083        __tmp.put_u8(self.target_component);
6084        __tmp.put_u8(self.landed_state as u8);
6085        if matches!(version, MavlinkVersion::V2) {
6086            __tmp.put_f32_le(self.angular_velocity_z);
6087            let len = __tmp.len();
6088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6089        } else {
6090            __tmp.len()
6091        }
6092    }
6093}
6094#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6095#[doc = ""]
6096#[doc = "ID: 148"]
6097#[derive(Debug, Clone, PartialEq)]
6098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6100#[cfg_attr(feature = "ts", derive(TS))]
6101#[cfg_attr(feature = "ts", ts(export))]
6102pub struct AUTOPILOT_VERSION_DATA {
6103    #[doc = "Bitmap of capabilities"]
6104    pub capabilities: MavProtocolCapability,
6105    #[doc = "UID if provided by hardware (see uid2)"]
6106    pub uid: u64,
6107    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6108    pub flight_sw_version: u32,
6109    #[doc = "Middleware version number"]
6110    pub middleware_sw_version: u32,
6111    #[doc = "Operating system version number"]
6112    pub os_sw_version: u32,
6113    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6114    pub board_version: u32,
6115    #[doc = "ID of the board vendor"]
6116    pub vendor_id: u16,
6117    #[doc = "ID of the product"]
6118    pub product_id: u16,
6119    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6120    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6121    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6122    pub flight_custom_version: [u8; 8],
6123    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6124    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6125    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6126    pub middleware_custom_version: [u8; 8],
6127    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6128    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6129    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6130    pub os_custom_version: [u8; 8],
6131    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6132    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6133    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6134    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6135    pub uid2: [u8; 18],
6136}
6137impl AUTOPILOT_VERSION_DATA {
6138    pub const ENCODED_LEN: usize = 78usize;
6139    pub const DEFAULT: Self = Self {
6140        capabilities: MavProtocolCapability::DEFAULT,
6141        uid: 0_u64,
6142        flight_sw_version: 0_u32,
6143        middleware_sw_version: 0_u32,
6144        os_sw_version: 0_u32,
6145        board_version: 0_u32,
6146        vendor_id: 0_u16,
6147        product_id: 0_u16,
6148        flight_custom_version: [0_u8; 8usize],
6149        middleware_custom_version: [0_u8; 8usize],
6150        os_custom_version: [0_u8; 8usize],
6151        uid2: [0_u8; 18usize],
6152    };
6153    #[cfg(feature = "arbitrary")]
6154    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6155        use arbitrary::{Arbitrary, Unstructured};
6156        let mut buf = [0u8; 1024];
6157        rng.fill_bytes(&mut buf);
6158        let mut unstructured = Unstructured::new(&buf);
6159        Self::arbitrary(&mut unstructured).unwrap_or_default()
6160    }
6161}
6162impl Default for AUTOPILOT_VERSION_DATA {
6163    fn default() -> Self {
6164        Self::DEFAULT.clone()
6165    }
6166}
6167impl MessageData for AUTOPILOT_VERSION_DATA {
6168    type Message = MavMessage;
6169    const ID: u32 = 148u32;
6170    const NAME: &'static str = "AUTOPILOT_VERSION";
6171    const EXTRA_CRC: u8 = 178u8;
6172    const ENCODED_LEN: usize = 78usize;
6173    fn deser(
6174        _version: MavlinkVersion,
6175        __input: &[u8],
6176    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6177        let avail_len = __input.len();
6178        let mut payload_buf = [0; Self::ENCODED_LEN];
6179        let mut buf = if avail_len < Self::ENCODED_LEN {
6180            payload_buf[0..avail_len].copy_from_slice(__input);
6181            Bytes::new(&payload_buf)
6182        } else {
6183            Bytes::new(__input)
6184        };
6185        let mut __struct = Self::default();
6186        let tmp = buf.get_u64_le()?;
6187        __struct.capabilities = MavProtocolCapability::from_bits(
6188            tmp as <MavProtocolCapability as Flags>::Bits,
6189        )
6190        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6191            flag_type: "MavProtocolCapability",
6192            value: tmp as u64,
6193        })?;
6194        __struct.uid = buf.get_u64_le()?;
6195        __struct.flight_sw_version = buf.get_u32_le()?;
6196        __struct.middleware_sw_version = buf.get_u32_le()?;
6197        __struct.os_sw_version = buf.get_u32_le()?;
6198        __struct.board_version = buf.get_u32_le()?;
6199        __struct.vendor_id = buf.get_u16_le()?;
6200        __struct.product_id = buf.get_u16_le()?;
6201        for v in &mut __struct.flight_custom_version {
6202            let val = buf.get_u8()?;
6203            *v = val;
6204        }
6205        for v in &mut __struct.middleware_custom_version {
6206            let val = buf.get_u8()?;
6207            *v = val;
6208        }
6209        for v in &mut __struct.os_custom_version {
6210            let val = buf.get_u8()?;
6211            *v = val;
6212        }
6213        for v in &mut __struct.uid2 {
6214            let val = buf.get_u8()?;
6215            *v = val;
6216        }
6217        Ok(__struct)
6218    }
6219    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6220        let mut __tmp = BytesMut::new(bytes);
6221        #[allow(clippy::absurd_extreme_comparisons)]
6222        #[allow(unused_comparisons)]
6223        if __tmp.remaining() < Self::ENCODED_LEN {
6224            panic!(
6225                "buffer is too small (need {} bytes, but got {})",
6226                Self::ENCODED_LEN,
6227                __tmp.remaining(),
6228            )
6229        }
6230        __tmp.put_u64_le(self.capabilities.bits() as u64);
6231        __tmp.put_u64_le(self.uid);
6232        __tmp.put_u32_le(self.flight_sw_version);
6233        __tmp.put_u32_le(self.middleware_sw_version);
6234        __tmp.put_u32_le(self.os_sw_version);
6235        __tmp.put_u32_le(self.board_version);
6236        __tmp.put_u16_le(self.vendor_id);
6237        __tmp.put_u16_le(self.product_id);
6238        for val in &self.flight_custom_version {
6239            __tmp.put_u8(*val);
6240        }
6241        for val in &self.middleware_custom_version {
6242            __tmp.put_u8(*val);
6243        }
6244        for val in &self.os_custom_version {
6245            __tmp.put_u8(*val);
6246        }
6247        if matches!(version, MavlinkVersion::V2) {
6248            for val in &self.uid2 {
6249                __tmp.put_u8(*val);
6250            }
6251            let len = __tmp.len();
6252            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6253        } else {
6254            __tmp.len()
6255        }
6256    }
6257}
6258#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6259#[doc = ""]
6260#[doc = "ID: 435"]
6261#[derive(Debug, Clone, PartialEq)]
6262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6264#[cfg_attr(feature = "ts", derive(TS))]
6265#[cfg_attr(feature = "ts", ts(export))]
6266pub struct AVAILABLE_MODES_DATA {
6267    #[doc = "A bitfield for use for autopilot-specific flags"]
6268    pub custom_mode: u32,
6269    #[doc = "Mode properties."]
6270    pub properties: MavModeProperty,
6271    #[doc = "The total number of available modes for the current vehicle type."]
6272    pub number_modes: u8,
6273    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6274    pub mode_index: u8,
6275    #[doc = "Standard mode."]
6276    pub standard_mode: MavStandardMode,
6277    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6278    #[cfg_attr(feature = "ts", ts(type = "string"))]
6279    pub mode_name: CharArray<35>,
6280}
6281impl AVAILABLE_MODES_DATA {
6282    pub const ENCODED_LEN: usize = 46usize;
6283    pub const DEFAULT: Self = Self {
6284        custom_mode: 0_u32,
6285        properties: MavModeProperty::DEFAULT,
6286        number_modes: 0_u8,
6287        mode_index: 0_u8,
6288        standard_mode: MavStandardMode::DEFAULT,
6289        mode_name: CharArray::new([0_u8; 35usize]),
6290    };
6291    #[cfg(feature = "arbitrary")]
6292    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6293        use arbitrary::{Arbitrary, Unstructured};
6294        let mut buf = [0u8; 1024];
6295        rng.fill_bytes(&mut buf);
6296        let mut unstructured = Unstructured::new(&buf);
6297        Self::arbitrary(&mut unstructured).unwrap_or_default()
6298    }
6299}
6300impl Default for AVAILABLE_MODES_DATA {
6301    fn default() -> Self {
6302        Self::DEFAULT.clone()
6303    }
6304}
6305impl MessageData for AVAILABLE_MODES_DATA {
6306    type Message = MavMessage;
6307    const ID: u32 = 435u32;
6308    const NAME: &'static str = "AVAILABLE_MODES";
6309    const EXTRA_CRC: u8 = 134u8;
6310    const ENCODED_LEN: usize = 46usize;
6311    fn deser(
6312        _version: MavlinkVersion,
6313        __input: &[u8],
6314    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6315        let avail_len = __input.len();
6316        let mut payload_buf = [0; Self::ENCODED_LEN];
6317        let mut buf = if avail_len < Self::ENCODED_LEN {
6318            payload_buf[0..avail_len].copy_from_slice(__input);
6319            Bytes::new(&payload_buf)
6320        } else {
6321            Bytes::new(__input)
6322        };
6323        let mut __struct = Self::default();
6324        __struct.custom_mode = buf.get_u32_le()?;
6325        let tmp = buf.get_u32_le()?;
6326        __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
6327            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6328            flag_type: "MavModeProperty",
6329            value: tmp as u64,
6330        })?;
6331        __struct.number_modes = buf.get_u8()?;
6332        __struct.mode_index = buf.get_u8()?;
6333        let tmp = buf.get_u8()?;
6334        __struct.standard_mode =
6335            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6336                enum_type: "MavStandardMode",
6337                value: tmp as u64,
6338            })?;
6339        let mut tmp = [0_u8; 35usize];
6340        for v in &mut tmp {
6341            *v = buf.get_u8()?;
6342        }
6343        __struct.mode_name = CharArray::new(tmp);
6344        Ok(__struct)
6345    }
6346    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6347        let mut __tmp = BytesMut::new(bytes);
6348        #[allow(clippy::absurd_extreme_comparisons)]
6349        #[allow(unused_comparisons)]
6350        if __tmp.remaining() < Self::ENCODED_LEN {
6351            panic!(
6352                "buffer is too small (need {} bytes, but got {})",
6353                Self::ENCODED_LEN,
6354                __tmp.remaining(),
6355            )
6356        }
6357        __tmp.put_u32_le(self.custom_mode);
6358        __tmp.put_u32_le(self.properties.bits() as u32);
6359        __tmp.put_u8(self.number_modes);
6360        __tmp.put_u8(self.mode_index);
6361        __tmp.put_u8(self.standard_mode as u8);
6362        for val in &self.mode_name {
6363            __tmp.put_u8(*val);
6364        }
6365        if matches!(version, MavlinkVersion::V2) {
6366            let len = __tmp.len();
6367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6368        } else {
6369            __tmp.len()
6370        }
6371    }
6372}
6373#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6374#[doc = ""]
6375#[doc = "ID: 437"]
6376#[derive(Debug, Clone, PartialEq)]
6377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6379#[cfg_attr(feature = "ts", derive(TS))]
6380#[cfg_attr(feature = "ts", ts(export))]
6381pub struct AVAILABLE_MODES_MONITOR_DATA {
6382    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6383    pub seq: u8,
6384}
6385impl AVAILABLE_MODES_MONITOR_DATA {
6386    pub const ENCODED_LEN: usize = 1usize;
6387    pub const DEFAULT: Self = Self { seq: 0_u8 };
6388    #[cfg(feature = "arbitrary")]
6389    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6390        use arbitrary::{Arbitrary, Unstructured};
6391        let mut buf = [0u8; 1024];
6392        rng.fill_bytes(&mut buf);
6393        let mut unstructured = Unstructured::new(&buf);
6394        Self::arbitrary(&mut unstructured).unwrap_or_default()
6395    }
6396}
6397impl Default for AVAILABLE_MODES_MONITOR_DATA {
6398    fn default() -> Self {
6399        Self::DEFAULT.clone()
6400    }
6401}
6402impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6403    type Message = MavMessage;
6404    const ID: u32 = 437u32;
6405    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6406    const EXTRA_CRC: u8 = 30u8;
6407    const ENCODED_LEN: usize = 1usize;
6408    fn deser(
6409        _version: MavlinkVersion,
6410        __input: &[u8],
6411    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6412        let avail_len = __input.len();
6413        let mut payload_buf = [0; Self::ENCODED_LEN];
6414        let mut buf = if avail_len < Self::ENCODED_LEN {
6415            payload_buf[0..avail_len].copy_from_slice(__input);
6416            Bytes::new(&payload_buf)
6417        } else {
6418            Bytes::new(__input)
6419        };
6420        let mut __struct = Self::default();
6421        __struct.seq = buf.get_u8()?;
6422        Ok(__struct)
6423    }
6424    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6425        let mut __tmp = BytesMut::new(bytes);
6426        #[allow(clippy::absurd_extreme_comparisons)]
6427        #[allow(unused_comparisons)]
6428        if __tmp.remaining() < Self::ENCODED_LEN {
6429            panic!(
6430                "buffer is too small (need {} bytes, but got {})",
6431                Self::ENCODED_LEN,
6432                __tmp.remaining(),
6433            )
6434        }
6435        __tmp.put_u8(self.seq);
6436        if matches!(version, MavlinkVersion::V2) {
6437            let len = __tmp.len();
6438            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6439        } else {
6440            __tmp.len()
6441        }
6442    }
6443}
6444#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6445#[doc = ""]
6446#[doc = "ID: 372"]
6447#[derive(Debug, Clone, PartialEq)]
6448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6450#[cfg_attr(feature = "ts", derive(TS))]
6451#[cfg_attr(feature = "ts", ts(export))]
6452pub struct BATTERY_INFO_DATA {
6453    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6454    pub discharge_minimum_voltage: f32,
6455    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6456    pub charging_minimum_voltage: f32,
6457    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6458    pub resting_minimum_voltage: f32,
6459    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6460    pub charging_maximum_voltage: f32,
6461    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6462    pub charging_maximum_current: f32,
6463    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6464    pub nominal_voltage: f32,
6465    #[doc = "Maximum pack discharge current. 0: field not provided."]
6466    pub discharge_maximum_current: f32,
6467    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6468    pub discharge_maximum_burst_current: f32,
6469    #[doc = "Fully charged design capacity. 0: field not provided."]
6470    pub design_capacity: f32,
6471    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6472    pub full_charge_capacity: f32,
6473    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6474    pub cycle_count: u16,
6475    #[doc = "Battery weight. 0: field not provided."]
6476    pub weight: u16,
6477    #[doc = "Battery ID"]
6478    pub id: u8,
6479    #[doc = "Function of the battery."]
6480    pub battery_function: MavBatteryFunction,
6481    #[doc = "Type (chemistry) of the battery."]
6482    pub mavtype: MavBatteryType,
6483    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6484    pub state_of_health: u8,
6485    #[doc = "Number of battery cells in series. 0: field not provided."]
6486    pub cells_in_series: u8,
6487    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6488    #[cfg_attr(feature = "ts", ts(type = "string"))]
6489    pub manufacture_date: CharArray<9>,
6490    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6491    #[cfg_attr(feature = "ts", ts(type = "string"))]
6492    pub serial_number: CharArray<32>,
6493    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6494    #[cfg_attr(feature = "ts", ts(type = "string"))]
6495    pub name: CharArray<50>,
6496}
6497impl BATTERY_INFO_DATA {
6498    pub const ENCODED_LEN: usize = 140usize;
6499    pub const DEFAULT: Self = Self {
6500        discharge_minimum_voltage: 0.0_f32,
6501        charging_minimum_voltage: 0.0_f32,
6502        resting_minimum_voltage: 0.0_f32,
6503        charging_maximum_voltage: 0.0_f32,
6504        charging_maximum_current: 0.0_f32,
6505        nominal_voltage: 0.0_f32,
6506        discharge_maximum_current: 0.0_f32,
6507        discharge_maximum_burst_current: 0.0_f32,
6508        design_capacity: 0.0_f32,
6509        full_charge_capacity: 0.0_f32,
6510        cycle_count: 0_u16,
6511        weight: 0_u16,
6512        id: 0_u8,
6513        battery_function: MavBatteryFunction::DEFAULT,
6514        mavtype: MavBatteryType::DEFAULT,
6515        state_of_health: 0_u8,
6516        cells_in_series: 0_u8,
6517        manufacture_date: CharArray::new([0_u8; 9usize]),
6518        serial_number: CharArray::new([0_u8; 32usize]),
6519        name: CharArray::new([0_u8; 50usize]),
6520    };
6521    #[cfg(feature = "arbitrary")]
6522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6523        use arbitrary::{Arbitrary, Unstructured};
6524        let mut buf = [0u8; 1024];
6525        rng.fill_bytes(&mut buf);
6526        let mut unstructured = Unstructured::new(&buf);
6527        Self::arbitrary(&mut unstructured).unwrap_or_default()
6528    }
6529}
6530impl Default for BATTERY_INFO_DATA {
6531    fn default() -> Self {
6532        Self::DEFAULT.clone()
6533    }
6534}
6535impl MessageData for BATTERY_INFO_DATA {
6536    type Message = MavMessage;
6537    const ID: u32 = 372u32;
6538    const NAME: &'static str = "BATTERY_INFO";
6539    const EXTRA_CRC: u8 = 26u8;
6540    const ENCODED_LEN: usize = 140usize;
6541    fn deser(
6542        _version: MavlinkVersion,
6543        __input: &[u8],
6544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6545        let avail_len = __input.len();
6546        let mut payload_buf = [0; Self::ENCODED_LEN];
6547        let mut buf = if avail_len < Self::ENCODED_LEN {
6548            payload_buf[0..avail_len].copy_from_slice(__input);
6549            Bytes::new(&payload_buf)
6550        } else {
6551            Bytes::new(__input)
6552        };
6553        let mut __struct = Self::default();
6554        __struct.discharge_minimum_voltage = buf.get_f32_le()?;
6555        __struct.charging_minimum_voltage = buf.get_f32_le()?;
6556        __struct.resting_minimum_voltage = buf.get_f32_le()?;
6557        __struct.charging_maximum_voltage = buf.get_f32_le()?;
6558        __struct.charging_maximum_current = buf.get_f32_le()?;
6559        __struct.nominal_voltage = buf.get_f32_le()?;
6560        __struct.discharge_maximum_current = buf.get_f32_le()?;
6561        __struct.discharge_maximum_burst_current = buf.get_f32_le()?;
6562        __struct.design_capacity = buf.get_f32_le()?;
6563        __struct.full_charge_capacity = buf.get_f32_le()?;
6564        __struct.cycle_count = buf.get_u16_le()?;
6565        __struct.weight = buf.get_u16_le()?;
6566        __struct.id = buf.get_u8()?;
6567        let tmp = buf.get_u8()?;
6568        __struct.battery_function =
6569            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6570                enum_type: "MavBatteryFunction",
6571                value: tmp as u64,
6572            })?;
6573        let tmp = buf.get_u8()?;
6574        __struct.mavtype =
6575            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6576                enum_type: "MavBatteryType",
6577                value: tmp as u64,
6578            })?;
6579        __struct.state_of_health = buf.get_u8()?;
6580        __struct.cells_in_series = buf.get_u8()?;
6581        let mut tmp = [0_u8; 9usize];
6582        for v in &mut tmp {
6583            *v = buf.get_u8()?;
6584        }
6585        __struct.manufacture_date = CharArray::new(tmp);
6586        let mut tmp = [0_u8; 32usize];
6587        for v in &mut tmp {
6588            *v = buf.get_u8()?;
6589        }
6590        __struct.serial_number = CharArray::new(tmp);
6591        let mut tmp = [0_u8; 50usize];
6592        for v in &mut tmp {
6593            *v = buf.get_u8()?;
6594        }
6595        __struct.name = CharArray::new(tmp);
6596        Ok(__struct)
6597    }
6598    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6599        let mut __tmp = BytesMut::new(bytes);
6600        #[allow(clippy::absurd_extreme_comparisons)]
6601        #[allow(unused_comparisons)]
6602        if __tmp.remaining() < Self::ENCODED_LEN {
6603            panic!(
6604                "buffer is too small (need {} bytes, but got {})",
6605                Self::ENCODED_LEN,
6606                __tmp.remaining(),
6607            )
6608        }
6609        __tmp.put_f32_le(self.discharge_minimum_voltage);
6610        __tmp.put_f32_le(self.charging_minimum_voltage);
6611        __tmp.put_f32_le(self.resting_minimum_voltage);
6612        __tmp.put_f32_le(self.charging_maximum_voltage);
6613        __tmp.put_f32_le(self.charging_maximum_current);
6614        __tmp.put_f32_le(self.nominal_voltage);
6615        __tmp.put_f32_le(self.discharge_maximum_current);
6616        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6617        __tmp.put_f32_le(self.design_capacity);
6618        __tmp.put_f32_le(self.full_charge_capacity);
6619        __tmp.put_u16_le(self.cycle_count);
6620        __tmp.put_u16_le(self.weight);
6621        __tmp.put_u8(self.id);
6622        __tmp.put_u8(self.battery_function as u8);
6623        __tmp.put_u8(self.mavtype as u8);
6624        __tmp.put_u8(self.state_of_health);
6625        __tmp.put_u8(self.cells_in_series);
6626        for val in &self.manufacture_date {
6627            __tmp.put_u8(*val);
6628        }
6629        for val in &self.serial_number {
6630            __tmp.put_u8(*val);
6631        }
6632        for val in &self.name {
6633            __tmp.put_u8(*val);
6634        }
6635        if matches!(version, MavlinkVersion::V2) {
6636            let len = __tmp.len();
6637            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6638        } else {
6639            __tmp.len()
6640        }
6641    }
6642}
6643#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6644#[doc = ""]
6645#[doc = "ID: 147"]
6646#[derive(Debug, Clone, PartialEq)]
6647#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6649#[cfg_attr(feature = "ts", derive(TS))]
6650#[cfg_attr(feature = "ts", ts(export))]
6651pub struct BATTERY_STATUS_DATA {
6652    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6653    pub current_consumed: i32,
6654    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6655    pub energy_consumed: i32,
6656    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6657    pub temperature: i16,
6658    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6659    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6660    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6661    pub voltages: [u16; 10],
6662    #[doc = "Battery current, -1: autopilot does not measure the current"]
6663    pub current_battery: i16,
6664    #[doc = "Battery ID"]
6665    pub id: u8,
6666    #[doc = "Function of the battery"]
6667    pub battery_function: MavBatteryFunction,
6668    #[doc = "Type (chemistry) of the battery"]
6669    pub mavtype: MavBatteryType,
6670    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6671    pub battery_remaining: i8,
6672    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6673    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6674    pub time_remaining: i32,
6675    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6676    #[cfg_attr(feature = "serde", serde(default))]
6677    pub charge_state: MavBatteryChargeState,
6678    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6679    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6680    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6681    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6682    pub voltages_ext: [u16; 4],
6683    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6684    #[cfg_attr(feature = "serde", serde(default))]
6685    pub mode: MavBatteryMode,
6686    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6687    #[cfg_attr(feature = "serde", serde(default))]
6688    pub fault_bitmask: MavBatteryFault,
6689}
6690impl BATTERY_STATUS_DATA {
6691    pub const ENCODED_LEN: usize = 54usize;
6692    pub const DEFAULT: Self = Self {
6693        current_consumed: 0_i32,
6694        energy_consumed: 0_i32,
6695        temperature: 0_i16,
6696        voltages: [0_u16; 10usize],
6697        current_battery: 0_i16,
6698        id: 0_u8,
6699        battery_function: MavBatteryFunction::DEFAULT,
6700        mavtype: MavBatteryType::DEFAULT,
6701        battery_remaining: 0_i8,
6702        time_remaining: 0_i32,
6703        charge_state: MavBatteryChargeState::DEFAULT,
6704        voltages_ext: [0_u16; 4usize],
6705        mode: MavBatteryMode::DEFAULT,
6706        fault_bitmask: MavBatteryFault::DEFAULT,
6707    };
6708    #[cfg(feature = "arbitrary")]
6709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6710        use arbitrary::{Arbitrary, Unstructured};
6711        let mut buf = [0u8; 1024];
6712        rng.fill_bytes(&mut buf);
6713        let mut unstructured = Unstructured::new(&buf);
6714        Self::arbitrary(&mut unstructured).unwrap_or_default()
6715    }
6716}
6717impl Default for BATTERY_STATUS_DATA {
6718    fn default() -> Self {
6719        Self::DEFAULT.clone()
6720    }
6721}
6722impl MessageData for BATTERY_STATUS_DATA {
6723    type Message = MavMessage;
6724    const ID: u32 = 147u32;
6725    const NAME: &'static str = "BATTERY_STATUS";
6726    const EXTRA_CRC: u8 = 154u8;
6727    const ENCODED_LEN: usize = 54usize;
6728    fn deser(
6729        _version: MavlinkVersion,
6730        __input: &[u8],
6731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6732        let avail_len = __input.len();
6733        let mut payload_buf = [0; Self::ENCODED_LEN];
6734        let mut buf = if avail_len < Self::ENCODED_LEN {
6735            payload_buf[0..avail_len].copy_from_slice(__input);
6736            Bytes::new(&payload_buf)
6737        } else {
6738            Bytes::new(__input)
6739        };
6740        let mut __struct = Self::default();
6741        __struct.current_consumed = buf.get_i32_le()?;
6742        __struct.energy_consumed = buf.get_i32_le()?;
6743        __struct.temperature = buf.get_i16_le()?;
6744        for v in &mut __struct.voltages {
6745            let val = buf.get_u16_le()?;
6746            *v = val;
6747        }
6748        __struct.current_battery = buf.get_i16_le()?;
6749        __struct.id = buf.get_u8()?;
6750        let tmp = buf.get_u8()?;
6751        __struct.battery_function =
6752            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6753                enum_type: "MavBatteryFunction",
6754                value: tmp as u64,
6755            })?;
6756        let tmp = buf.get_u8()?;
6757        __struct.mavtype =
6758            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6759                enum_type: "MavBatteryType",
6760                value: tmp as u64,
6761            })?;
6762        __struct.battery_remaining = buf.get_i8()?;
6763        __struct.time_remaining = buf.get_i32_le()?;
6764        let tmp = buf.get_u8()?;
6765        __struct.charge_state =
6766            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6767                enum_type: "MavBatteryChargeState",
6768                value: tmp as u64,
6769            })?;
6770        for v in &mut __struct.voltages_ext {
6771            let val = buf.get_u16_le()?;
6772            *v = val;
6773        }
6774        let tmp = buf.get_u8()?;
6775        __struct.mode =
6776            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6777                enum_type: "MavBatteryMode",
6778                value: tmp as u64,
6779            })?;
6780        let tmp = buf.get_u32_le()?;
6781        __struct.fault_bitmask = MavBatteryFault::from_bits(
6782            tmp as <MavBatteryFault as Flags>::Bits,
6783        )
6784        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6785            flag_type: "MavBatteryFault",
6786            value: tmp as u64,
6787        })?;
6788        Ok(__struct)
6789    }
6790    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6791        let mut __tmp = BytesMut::new(bytes);
6792        #[allow(clippy::absurd_extreme_comparisons)]
6793        #[allow(unused_comparisons)]
6794        if __tmp.remaining() < Self::ENCODED_LEN {
6795            panic!(
6796                "buffer is too small (need {} bytes, but got {})",
6797                Self::ENCODED_LEN,
6798                __tmp.remaining(),
6799            )
6800        }
6801        __tmp.put_i32_le(self.current_consumed);
6802        __tmp.put_i32_le(self.energy_consumed);
6803        __tmp.put_i16_le(self.temperature);
6804        for val in &self.voltages {
6805            __tmp.put_u16_le(*val);
6806        }
6807        __tmp.put_i16_le(self.current_battery);
6808        __tmp.put_u8(self.id);
6809        __tmp.put_u8(self.battery_function as u8);
6810        __tmp.put_u8(self.mavtype as u8);
6811        __tmp.put_i8(self.battery_remaining);
6812        if matches!(version, MavlinkVersion::V2) {
6813            __tmp.put_i32_le(self.time_remaining);
6814            __tmp.put_u8(self.charge_state as u8);
6815            for val in &self.voltages_ext {
6816                __tmp.put_u16_le(*val);
6817            }
6818            __tmp.put_u8(self.mode as u8);
6819            __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
6820            let len = __tmp.len();
6821            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6822        } else {
6823            __tmp.len()
6824        }
6825    }
6826}
6827#[doc = "Report button state change."]
6828#[doc = ""]
6829#[doc = "ID: 257"]
6830#[derive(Debug, Clone, PartialEq)]
6831#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6833#[cfg_attr(feature = "ts", derive(TS))]
6834#[cfg_attr(feature = "ts", ts(export))]
6835pub struct BUTTON_CHANGE_DATA {
6836    #[doc = "Timestamp (time since system boot)."]
6837    pub time_boot_ms: u32,
6838    #[doc = "Time of last change of button state."]
6839    pub last_change_ms: u32,
6840    #[doc = "Bitmap for state of buttons."]
6841    pub state: u8,
6842}
6843impl BUTTON_CHANGE_DATA {
6844    pub const ENCODED_LEN: usize = 9usize;
6845    pub const DEFAULT: Self = Self {
6846        time_boot_ms: 0_u32,
6847        last_change_ms: 0_u32,
6848        state: 0_u8,
6849    };
6850    #[cfg(feature = "arbitrary")]
6851    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6852        use arbitrary::{Arbitrary, Unstructured};
6853        let mut buf = [0u8; 1024];
6854        rng.fill_bytes(&mut buf);
6855        let mut unstructured = Unstructured::new(&buf);
6856        Self::arbitrary(&mut unstructured).unwrap_or_default()
6857    }
6858}
6859impl Default for BUTTON_CHANGE_DATA {
6860    fn default() -> Self {
6861        Self::DEFAULT.clone()
6862    }
6863}
6864impl MessageData for BUTTON_CHANGE_DATA {
6865    type Message = MavMessage;
6866    const ID: u32 = 257u32;
6867    const NAME: &'static str = "BUTTON_CHANGE";
6868    const EXTRA_CRC: u8 = 131u8;
6869    const ENCODED_LEN: usize = 9usize;
6870    fn deser(
6871        _version: MavlinkVersion,
6872        __input: &[u8],
6873    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6874        let avail_len = __input.len();
6875        let mut payload_buf = [0; Self::ENCODED_LEN];
6876        let mut buf = if avail_len < Self::ENCODED_LEN {
6877            payload_buf[0..avail_len].copy_from_slice(__input);
6878            Bytes::new(&payload_buf)
6879        } else {
6880            Bytes::new(__input)
6881        };
6882        let mut __struct = Self::default();
6883        __struct.time_boot_ms = buf.get_u32_le()?;
6884        __struct.last_change_ms = buf.get_u32_le()?;
6885        __struct.state = buf.get_u8()?;
6886        Ok(__struct)
6887    }
6888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6889        let mut __tmp = BytesMut::new(bytes);
6890        #[allow(clippy::absurd_extreme_comparisons)]
6891        #[allow(unused_comparisons)]
6892        if __tmp.remaining() < Self::ENCODED_LEN {
6893            panic!(
6894                "buffer is too small (need {} bytes, but got {})",
6895                Self::ENCODED_LEN,
6896                __tmp.remaining(),
6897            )
6898        }
6899        __tmp.put_u32_le(self.time_boot_ms);
6900        __tmp.put_u32_le(self.last_change_ms);
6901        __tmp.put_u8(self.state);
6902        if matches!(version, MavlinkVersion::V2) {
6903            let len = __tmp.len();
6904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6905        } else {
6906            __tmp.len()
6907        }
6908    }
6909}
6910#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6911#[doc = ""]
6912#[doc = "ID: 262"]
6913#[derive(Debug, Clone, PartialEq)]
6914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6916#[cfg_attr(feature = "ts", derive(TS))]
6917#[cfg_attr(feature = "ts", ts(export))]
6918pub struct CAMERA_CAPTURE_STATUS_DATA {
6919    #[doc = "Timestamp (time since system boot)."]
6920    pub time_boot_ms: u32,
6921    #[doc = "Image capture interval"]
6922    pub image_interval: f32,
6923    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6924    pub recording_time_ms: u32,
6925    #[doc = "Available storage capacity."]
6926    pub available_capacity: f32,
6927    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6928    pub image_status: u8,
6929    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6930    pub video_status: u8,
6931    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6932    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6933    pub image_count: i32,
6934    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6935    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6936    pub camera_device_id: u8,
6937}
6938impl CAMERA_CAPTURE_STATUS_DATA {
6939    pub const ENCODED_LEN: usize = 23usize;
6940    pub const DEFAULT: Self = Self {
6941        time_boot_ms: 0_u32,
6942        image_interval: 0.0_f32,
6943        recording_time_ms: 0_u32,
6944        available_capacity: 0.0_f32,
6945        image_status: 0_u8,
6946        video_status: 0_u8,
6947        image_count: 0_i32,
6948        camera_device_id: 0_u8,
6949    };
6950    #[cfg(feature = "arbitrary")]
6951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6952        use arbitrary::{Arbitrary, Unstructured};
6953        let mut buf = [0u8; 1024];
6954        rng.fill_bytes(&mut buf);
6955        let mut unstructured = Unstructured::new(&buf);
6956        Self::arbitrary(&mut unstructured).unwrap_or_default()
6957    }
6958}
6959impl Default for CAMERA_CAPTURE_STATUS_DATA {
6960    fn default() -> Self {
6961        Self::DEFAULT.clone()
6962    }
6963}
6964impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
6965    type Message = MavMessage;
6966    const ID: u32 = 262u32;
6967    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
6968    const EXTRA_CRC: u8 = 12u8;
6969    const ENCODED_LEN: usize = 23usize;
6970    fn deser(
6971        _version: MavlinkVersion,
6972        __input: &[u8],
6973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6974        let avail_len = __input.len();
6975        let mut payload_buf = [0; Self::ENCODED_LEN];
6976        let mut buf = if avail_len < Self::ENCODED_LEN {
6977            payload_buf[0..avail_len].copy_from_slice(__input);
6978            Bytes::new(&payload_buf)
6979        } else {
6980            Bytes::new(__input)
6981        };
6982        let mut __struct = Self::default();
6983        __struct.time_boot_ms = buf.get_u32_le()?;
6984        __struct.image_interval = buf.get_f32_le()?;
6985        __struct.recording_time_ms = buf.get_u32_le()?;
6986        __struct.available_capacity = buf.get_f32_le()?;
6987        __struct.image_status = buf.get_u8()?;
6988        __struct.video_status = buf.get_u8()?;
6989        __struct.image_count = buf.get_i32_le()?;
6990        __struct.camera_device_id = buf.get_u8()?;
6991        Ok(__struct)
6992    }
6993    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6994        let mut __tmp = BytesMut::new(bytes);
6995        #[allow(clippy::absurd_extreme_comparisons)]
6996        #[allow(unused_comparisons)]
6997        if __tmp.remaining() < Self::ENCODED_LEN {
6998            panic!(
6999                "buffer is too small (need {} bytes, but got {})",
7000                Self::ENCODED_LEN,
7001                __tmp.remaining(),
7002            )
7003        }
7004        __tmp.put_u32_le(self.time_boot_ms);
7005        __tmp.put_f32_le(self.image_interval);
7006        __tmp.put_u32_le(self.recording_time_ms);
7007        __tmp.put_f32_le(self.available_capacity);
7008        __tmp.put_u8(self.image_status);
7009        __tmp.put_u8(self.video_status);
7010        if matches!(version, MavlinkVersion::V2) {
7011            __tmp.put_i32_le(self.image_count);
7012            __tmp.put_u8(self.camera_device_id);
7013            let len = __tmp.len();
7014            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7015        } else {
7016            __tmp.len()
7017        }
7018    }
7019}
7020#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7021#[doc = ""]
7022#[doc = "ID: 271"]
7023#[derive(Debug, Clone, PartialEq)]
7024#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7026#[cfg_attr(feature = "ts", derive(TS))]
7027#[cfg_attr(feature = "ts", ts(export))]
7028pub struct CAMERA_FOV_STATUS_DATA {
7029    #[doc = "Timestamp (time since system boot)."]
7030    pub time_boot_ms: u32,
7031    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7032    pub lat_camera: i32,
7033    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7034    pub lon_camera: i32,
7035    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7036    pub alt_camera: i32,
7037    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7038    pub lat_image: i32,
7039    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7040    pub lon_image: i32,
7041    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7042    pub alt_image: i32,
7043    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7044    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7045    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7046    pub q: [f32; 4],
7047    #[doc = "Horizontal field of view (NaN if unknown)."]
7048    pub hfov: f32,
7049    #[doc = "Vertical field of view (NaN if unknown)."]
7050    pub vfov: f32,
7051    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7052    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7053    pub camera_device_id: u8,
7054}
7055impl CAMERA_FOV_STATUS_DATA {
7056    pub const ENCODED_LEN: usize = 53usize;
7057    pub const DEFAULT: Self = Self {
7058        time_boot_ms: 0_u32,
7059        lat_camera: 0_i32,
7060        lon_camera: 0_i32,
7061        alt_camera: 0_i32,
7062        lat_image: 0_i32,
7063        lon_image: 0_i32,
7064        alt_image: 0_i32,
7065        q: [0.0_f32; 4usize],
7066        hfov: 0.0_f32,
7067        vfov: 0.0_f32,
7068        camera_device_id: 0_u8,
7069    };
7070    #[cfg(feature = "arbitrary")]
7071    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7072        use arbitrary::{Arbitrary, Unstructured};
7073        let mut buf = [0u8; 1024];
7074        rng.fill_bytes(&mut buf);
7075        let mut unstructured = Unstructured::new(&buf);
7076        Self::arbitrary(&mut unstructured).unwrap_or_default()
7077    }
7078}
7079impl Default for CAMERA_FOV_STATUS_DATA {
7080    fn default() -> Self {
7081        Self::DEFAULT.clone()
7082    }
7083}
7084impl MessageData for CAMERA_FOV_STATUS_DATA {
7085    type Message = MavMessage;
7086    const ID: u32 = 271u32;
7087    const NAME: &'static str = "CAMERA_FOV_STATUS";
7088    const EXTRA_CRC: u8 = 22u8;
7089    const ENCODED_LEN: usize = 53usize;
7090    fn deser(
7091        _version: MavlinkVersion,
7092        __input: &[u8],
7093    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7094        let avail_len = __input.len();
7095        let mut payload_buf = [0; Self::ENCODED_LEN];
7096        let mut buf = if avail_len < Self::ENCODED_LEN {
7097            payload_buf[0..avail_len].copy_from_slice(__input);
7098            Bytes::new(&payload_buf)
7099        } else {
7100            Bytes::new(__input)
7101        };
7102        let mut __struct = Self::default();
7103        __struct.time_boot_ms = buf.get_u32_le()?;
7104        __struct.lat_camera = buf.get_i32_le()?;
7105        __struct.lon_camera = buf.get_i32_le()?;
7106        __struct.alt_camera = buf.get_i32_le()?;
7107        __struct.lat_image = buf.get_i32_le()?;
7108        __struct.lon_image = buf.get_i32_le()?;
7109        __struct.alt_image = buf.get_i32_le()?;
7110        for v in &mut __struct.q {
7111            let val = buf.get_f32_le()?;
7112            *v = val;
7113        }
7114        __struct.hfov = buf.get_f32_le()?;
7115        __struct.vfov = buf.get_f32_le()?;
7116        __struct.camera_device_id = buf.get_u8()?;
7117        Ok(__struct)
7118    }
7119    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7120        let mut __tmp = BytesMut::new(bytes);
7121        #[allow(clippy::absurd_extreme_comparisons)]
7122        #[allow(unused_comparisons)]
7123        if __tmp.remaining() < Self::ENCODED_LEN {
7124            panic!(
7125                "buffer is too small (need {} bytes, but got {})",
7126                Self::ENCODED_LEN,
7127                __tmp.remaining(),
7128            )
7129        }
7130        __tmp.put_u32_le(self.time_boot_ms);
7131        __tmp.put_i32_le(self.lat_camera);
7132        __tmp.put_i32_le(self.lon_camera);
7133        __tmp.put_i32_le(self.alt_camera);
7134        __tmp.put_i32_le(self.lat_image);
7135        __tmp.put_i32_le(self.lon_image);
7136        __tmp.put_i32_le(self.alt_image);
7137        for val in &self.q {
7138            __tmp.put_f32_le(*val);
7139        }
7140        __tmp.put_f32_le(self.hfov);
7141        __tmp.put_f32_le(self.vfov);
7142        if matches!(version, MavlinkVersion::V2) {
7143            __tmp.put_u8(self.camera_device_id);
7144            let len = __tmp.len();
7145            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7146        } else {
7147            __tmp.len()
7148        }
7149    }
7150}
7151#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7152#[doc = ""]
7153#[doc = "ID: 263"]
7154#[derive(Debug, Clone, PartialEq)]
7155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7157#[cfg_attr(feature = "ts", derive(TS))]
7158#[cfg_attr(feature = "ts", ts(export))]
7159pub struct CAMERA_IMAGE_CAPTURED_DATA {
7160    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7161    pub time_utc: u64,
7162    #[doc = "Timestamp (time since system boot)."]
7163    pub time_boot_ms: u32,
7164    #[doc = "Latitude where image was taken"]
7165    pub lat: i32,
7166    #[doc = "Longitude where capture was taken"]
7167    pub lon: i32,
7168    #[doc = "Altitude (MSL) where image was taken"]
7169    pub alt: i32,
7170    #[doc = "Altitude above ground"]
7171    pub relative_alt: i32,
7172    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7173    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7174    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7175    pub q: [f32; 4],
7176    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7177    pub image_index: i32,
7178    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7179    pub camera_id: u8,
7180    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7181    pub capture_result: i8,
7182    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7183    #[cfg_attr(feature = "ts", ts(type = "string"))]
7184    pub file_url: CharArray<205>,
7185}
7186impl CAMERA_IMAGE_CAPTURED_DATA {
7187    pub const ENCODED_LEN: usize = 255usize;
7188    pub const DEFAULT: Self = Self {
7189        time_utc: 0_u64,
7190        time_boot_ms: 0_u32,
7191        lat: 0_i32,
7192        lon: 0_i32,
7193        alt: 0_i32,
7194        relative_alt: 0_i32,
7195        q: [0.0_f32; 4usize],
7196        image_index: 0_i32,
7197        camera_id: 0_u8,
7198        capture_result: 0_i8,
7199        file_url: CharArray::new([0_u8; 205usize]),
7200    };
7201    #[cfg(feature = "arbitrary")]
7202    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7203        use arbitrary::{Arbitrary, Unstructured};
7204        let mut buf = [0u8; 1024];
7205        rng.fill_bytes(&mut buf);
7206        let mut unstructured = Unstructured::new(&buf);
7207        Self::arbitrary(&mut unstructured).unwrap_or_default()
7208    }
7209}
7210impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7211    fn default() -> Self {
7212        Self::DEFAULT.clone()
7213    }
7214}
7215impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7216    type Message = MavMessage;
7217    const ID: u32 = 263u32;
7218    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7219    const EXTRA_CRC: u8 = 133u8;
7220    const ENCODED_LEN: usize = 255usize;
7221    fn deser(
7222        _version: MavlinkVersion,
7223        __input: &[u8],
7224    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7225        let avail_len = __input.len();
7226        let mut payload_buf = [0; Self::ENCODED_LEN];
7227        let mut buf = if avail_len < Self::ENCODED_LEN {
7228            payload_buf[0..avail_len].copy_from_slice(__input);
7229            Bytes::new(&payload_buf)
7230        } else {
7231            Bytes::new(__input)
7232        };
7233        let mut __struct = Self::default();
7234        __struct.time_utc = buf.get_u64_le()?;
7235        __struct.time_boot_ms = buf.get_u32_le()?;
7236        __struct.lat = buf.get_i32_le()?;
7237        __struct.lon = buf.get_i32_le()?;
7238        __struct.alt = buf.get_i32_le()?;
7239        __struct.relative_alt = buf.get_i32_le()?;
7240        for v in &mut __struct.q {
7241            let val = buf.get_f32_le()?;
7242            *v = val;
7243        }
7244        __struct.image_index = buf.get_i32_le()?;
7245        __struct.camera_id = buf.get_u8()?;
7246        __struct.capture_result = buf.get_i8()?;
7247        let mut tmp = [0_u8; 205usize];
7248        for v in &mut tmp {
7249            *v = buf.get_u8()?;
7250        }
7251        __struct.file_url = CharArray::new(tmp);
7252        Ok(__struct)
7253    }
7254    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7255        let mut __tmp = BytesMut::new(bytes);
7256        #[allow(clippy::absurd_extreme_comparisons)]
7257        #[allow(unused_comparisons)]
7258        if __tmp.remaining() < Self::ENCODED_LEN {
7259            panic!(
7260                "buffer is too small (need {} bytes, but got {})",
7261                Self::ENCODED_LEN,
7262                __tmp.remaining(),
7263            )
7264        }
7265        __tmp.put_u64_le(self.time_utc);
7266        __tmp.put_u32_le(self.time_boot_ms);
7267        __tmp.put_i32_le(self.lat);
7268        __tmp.put_i32_le(self.lon);
7269        __tmp.put_i32_le(self.alt);
7270        __tmp.put_i32_le(self.relative_alt);
7271        for val in &self.q {
7272            __tmp.put_f32_le(*val);
7273        }
7274        __tmp.put_i32_le(self.image_index);
7275        __tmp.put_u8(self.camera_id);
7276        __tmp.put_i8(self.capture_result);
7277        for val in &self.file_url {
7278            __tmp.put_u8(*val);
7279        }
7280        if matches!(version, MavlinkVersion::V2) {
7281            let len = __tmp.len();
7282            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7283        } else {
7284            __tmp.len()
7285        }
7286    }
7287}
7288#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7289#[doc = ""]
7290#[doc = "ID: 259"]
7291#[derive(Debug, Clone, PartialEq)]
7292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7294#[cfg_attr(feature = "ts", derive(TS))]
7295#[cfg_attr(feature = "ts", ts(export))]
7296pub struct CAMERA_INFORMATION_DATA {
7297    #[doc = "Timestamp (time since system boot)."]
7298    pub time_boot_ms: u32,
7299    #[doc = "0xff). Use 0 if not known."]
7300    pub firmware_version: u32,
7301    #[doc = "Focal length. Use NaN if not known."]
7302    pub focal_length: f32,
7303    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7304    pub sensor_size_h: f32,
7305    #[doc = "Image sensor size vertical. Use NaN if not known."]
7306    pub sensor_size_v: f32,
7307    #[doc = "Bitmap of camera capability flags."]
7308    pub flags: CameraCapFlags,
7309    #[doc = "Horizontal image resolution. Use 0 if not known."]
7310    pub resolution_h: u16,
7311    #[doc = "Vertical image resolution. Use 0 if not known."]
7312    pub resolution_v: u16,
7313    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7314    pub cam_definition_version: u16,
7315    #[doc = "Name of the camera vendor"]
7316    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7317    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7318    pub vendor_name: [u8; 32],
7319    #[doc = "Name of the camera model"]
7320    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7321    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7322    pub model_name: [u8; 32],
7323    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7324    pub lens_id: u8,
7325    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7326    #[cfg_attr(feature = "ts", ts(type = "string"))]
7327    pub cam_definition_uri: CharArray<140>,
7328    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7329    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7330    pub gimbal_device_id: u8,
7331    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7332    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7333    pub camera_device_id: u8,
7334}
7335impl CAMERA_INFORMATION_DATA {
7336    pub const ENCODED_LEN: usize = 237usize;
7337    pub const DEFAULT: Self = Self {
7338        time_boot_ms: 0_u32,
7339        firmware_version: 0_u32,
7340        focal_length: 0.0_f32,
7341        sensor_size_h: 0.0_f32,
7342        sensor_size_v: 0.0_f32,
7343        flags: CameraCapFlags::DEFAULT,
7344        resolution_h: 0_u16,
7345        resolution_v: 0_u16,
7346        cam_definition_version: 0_u16,
7347        vendor_name: [0_u8; 32usize],
7348        model_name: [0_u8; 32usize],
7349        lens_id: 0_u8,
7350        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7351        gimbal_device_id: 0_u8,
7352        camera_device_id: 0_u8,
7353    };
7354    #[cfg(feature = "arbitrary")]
7355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7356        use arbitrary::{Arbitrary, Unstructured};
7357        let mut buf = [0u8; 1024];
7358        rng.fill_bytes(&mut buf);
7359        let mut unstructured = Unstructured::new(&buf);
7360        Self::arbitrary(&mut unstructured).unwrap_or_default()
7361    }
7362}
7363impl Default for CAMERA_INFORMATION_DATA {
7364    fn default() -> Self {
7365        Self::DEFAULT.clone()
7366    }
7367}
7368impl MessageData for CAMERA_INFORMATION_DATA {
7369    type Message = MavMessage;
7370    const ID: u32 = 259u32;
7371    const NAME: &'static str = "CAMERA_INFORMATION";
7372    const EXTRA_CRC: u8 = 92u8;
7373    const ENCODED_LEN: usize = 237usize;
7374    fn deser(
7375        _version: MavlinkVersion,
7376        __input: &[u8],
7377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7378        let avail_len = __input.len();
7379        let mut payload_buf = [0; Self::ENCODED_LEN];
7380        let mut buf = if avail_len < Self::ENCODED_LEN {
7381            payload_buf[0..avail_len].copy_from_slice(__input);
7382            Bytes::new(&payload_buf)
7383        } else {
7384            Bytes::new(__input)
7385        };
7386        let mut __struct = Self::default();
7387        __struct.time_boot_ms = buf.get_u32_le()?;
7388        __struct.firmware_version = buf.get_u32_le()?;
7389        __struct.focal_length = buf.get_f32_le()?;
7390        __struct.sensor_size_h = buf.get_f32_le()?;
7391        __struct.sensor_size_v = buf.get_f32_le()?;
7392        let tmp = buf.get_u32_le()?;
7393        __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
7394            ::mavlink_core::error::ParserError::InvalidFlag {
7395                flag_type: "CameraCapFlags",
7396                value: tmp as u64,
7397            },
7398        )?;
7399        __struct.resolution_h = buf.get_u16_le()?;
7400        __struct.resolution_v = buf.get_u16_le()?;
7401        __struct.cam_definition_version = buf.get_u16_le()?;
7402        for v in &mut __struct.vendor_name {
7403            let val = buf.get_u8()?;
7404            *v = val;
7405        }
7406        for v in &mut __struct.model_name {
7407            let val = buf.get_u8()?;
7408            *v = val;
7409        }
7410        __struct.lens_id = buf.get_u8()?;
7411        let mut tmp = [0_u8; 140usize];
7412        for v in &mut tmp {
7413            *v = buf.get_u8()?;
7414        }
7415        __struct.cam_definition_uri = CharArray::new(tmp);
7416        __struct.gimbal_device_id = buf.get_u8()?;
7417        __struct.camera_device_id = buf.get_u8()?;
7418        Ok(__struct)
7419    }
7420    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7421        let mut __tmp = BytesMut::new(bytes);
7422        #[allow(clippy::absurd_extreme_comparisons)]
7423        #[allow(unused_comparisons)]
7424        if __tmp.remaining() < Self::ENCODED_LEN {
7425            panic!(
7426                "buffer is too small (need {} bytes, but got {})",
7427                Self::ENCODED_LEN,
7428                __tmp.remaining(),
7429            )
7430        }
7431        __tmp.put_u32_le(self.time_boot_ms);
7432        __tmp.put_u32_le(self.firmware_version);
7433        __tmp.put_f32_le(self.focal_length);
7434        __tmp.put_f32_le(self.sensor_size_h);
7435        __tmp.put_f32_le(self.sensor_size_v);
7436        __tmp.put_u32_le(self.flags.bits() as u32);
7437        __tmp.put_u16_le(self.resolution_h);
7438        __tmp.put_u16_le(self.resolution_v);
7439        __tmp.put_u16_le(self.cam_definition_version);
7440        for val in &self.vendor_name {
7441            __tmp.put_u8(*val);
7442        }
7443        for val in &self.model_name {
7444            __tmp.put_u8(*val);
7445        }
7446        __tmp.put_u8(self.lens_id);
7447        for val in &self.cam_definition_uri {
7448            __tmp.put_u8(*val);
7449        }
7450        if matches!(version, MavlinkVersion::V2) {
7451            __tmp.put_u8(self.gimbal_device_id);
7452            __tmp.put_u8(self.camera_device_id);
7453            let len = __tmp.len();
7454            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7455        } else {
7456            __tmp.len()
7457        }
7458    }
7459}
7460#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7461#[doc = ""]
7462#[doc = "ID: 260"]
7463#[derive(Debug, Clone, PartialEq)]
7464#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7465#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7466#[cfg_attr(feature = "ts", derive(TS))]
7467#[cfg_attr(feature = "ts", ts(export))]
7468pub struct CAMERA_SETTINGS_DATA {
7469    #[doc = "Timestamp (time since system boot)."]
7470    pub time_boot_ms: u32,
7471    #[doc = "Camera mode"]
7472    pub mode_id: CameraMode,
7473    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7474    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7475    pub zoomLevel: f32,
7476    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7477    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7478    pub focusLevel: f32,
7479    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7480    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7481    pub camera_device_id: u8,
7482}
7483impl CAMERA_SETTINGS_DATA {
7484    pub const ENCODED_LEN: usize = 14usize;
7485    pub const DEFAULT: Self = Self {
7486        time_boot_ms: 0_u32,
7487        mode_id: CameraMode::DEFAULT,
7488        zoomLevel: 0.0_f32,
7489        focusLevel: 0.0_f32,
7490        camera_device_id: 0_u8,
7491    };
7492    #[cfg(feature = "arbitrary")]
7493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7494        use arbitrary::{Arbitrary, Unstructured};
7495        let mut buf = [0u8; 1024];
7496        rng.fill_bytes(&mut buf);
7497        let mut unstructured = Unstructured::new(&buf);
7498        Self::arbitrary(&mut unstructured).unwrap_or_default()
7499    }
7500}
7501impl Default for CAMERA_SETTINGS_DATA {
7502    fn default() -> Self {
7503        Self::DEFAULT.clone()
7504    }
7505}
7506impl MessageData for CAMERA_SETTINGS_DATA {
7507    type Message = MavMessage;
7508    const ID: u32 = 260u32;
7509    const NAME: &'static str = "CAMERA_SETTINGS";
7510    const EXTRA_CRC: u8 = 146u8;
7511    const ENCODED_LEN: usize = 14usize;
7512    fn deser(
7513        _version: MavlinkVersion,
7514        __input: &[u8],
7515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7516        let avail_len = __input.len();
7517        let mut payload_buf = [0; Self::ENCODED_LEN];
7518        let mut buf = if avail_len < Self::ENCODED_LEN {
7519            payload_buf[0..avail_len].copy_from_slice(__input);
7520            Bytes::new(&payload_buf)
7521        } else {
7522            Bytes::new(__input)
7523        };
7524        let mut __struct = Self::default();
7525        __struct.time_boot_ms = buf.get_u32_le()?;
7526        let tmp = buf.get_u8()?;
7527        __struct.mode_id =
7528            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7529                enum_type: "CameraMode",
7530                value: tmp as u64,
7531            })?;
7532        __struct.zoomLevel = buf.get_f32_le()?;
7533        __struct.focusLevel = buf.get_f32_le()?;
7534        __struct.camera_device_id = buf.get_u8()?;
7535        Ok(__struct)
7536    }
7537    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7538        let mut __tmp = BytesMut::new(bytes);
7539        #[allow(clippy::absurd_extreme_comparisons)]
7540        #[allow(unused_comparisons)]
7541        if __tmp.remaining() < Self::ENCODED_LEN {
7542            panic!(
7543                "buffer is too small (need {} bytes, but got {})",
7544                Self::ENCODED_LEN,
7545                __tmp.remaining(),
7546            )
7547        }
7548        __tmp.put_u32_le(self.time_boot_ms);
7549        __tmp.put_u8(self.mode_id as u8);
7550        if matches!(version, MavlinkVersion::V2) {
7551            __tmp.put_f32_le(self.zoomLevel);
7552            __tmp.put_f32_le(self.focusLevel);
7553            __tmp.put_u8(self.camera_device_id);
7554            let len = __tmp.len();
7555            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7556        } else {
7557            __tmp.len()
7558        }
7559    }
7560}
7561#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7562#[doc = ""]
7563#[doc = "ID: 277"]
7564#[derive(Debug, Clone, PartialEq)]
7565#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7567#[cfg_attr(feature = "ts", derive(TS))]
7568#[cfg_attr(feature = "ts", ts(export))]
7569pub struct CAMERA_THERMAL_RANGE_DATA {
7570    #[doc = "Timestamp (time since system boot)."]
7571    pub time_boot_ms: u32,
7572    #[doc = "Temperature max."]
7573    pub max: f32,
7574    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7575    pub max_point_x: f32,
7576    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7577    pub max_point_y: f32,
7578    #[doc = "Temperature min."]
7579    pub min: f32,
7580    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7581    pub min_point_x: f32,
7582    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7583    pub min_point_y: f32,
7584    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7585    pub stream_id: u8,
7586    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7587    pub camera_device_id: u8,
7588}
7589impl CAMERA_THERMAL_RANGE_DATA {
7590    pub const ENCODED_LEN: usize = 30usize;
7591    pub const DEFAULT: Self = Self {
7592        time_boot_ms: 0_u32,
7593        max: 0.0_f32,
7594        max_point_x: 0.0_f32,
7595        max_point_y: 0.0_f32,
7596        min: 0.0_f32,
7597        min_point_x: 0.0_f32,
7598        min_point_y: 0.0_f32,
7599        stream_id: 0_u8,
7600        camera_device_id: 0_u8,
7601    };
7602    #[cfg(feature = "arbitrary")]
7603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7604        use arbitrary::{Arbitrary, Unstructured};
7605        let mut buf = [0u8; 1024];
7606        rng.fill_bytes(&mut buf);
7607        let mut unstructured = Unstructured::new(&buf);
7608        Self::arbitrary(&mut unstructured).unwrap_or_default()
7609    }
7610}
7611impl Default for CAMERA_THERMAL_RANGE_DATA {
7612    fn default() -> Self {
7613        Self::DEFAULT.clone()
7614    }
7615}
7616impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7617    type Message = MavMessage;
7618    const ID: u32 = 277u32;
7619    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7620    const EXTRA_CRC: u8 = 62u8;
7621    const ENCODED_LEN: usize = 30usize;
7622    fn deser(
7623        _version: MavlinkVersion,
7624        __input: &[u8],
7625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7626        let avail_len = __input.len();
7627        let mut payload_buf = [0; Self::ENCODED_LEN];
7628        let mut buf = if avail_len < Self::ENCODED_LEN {
7629            payload_buf[0..avail_len].copy_from_slice(__input);
7630            Bytes::new(&payload_buf)
7631        } else {
7632            Bytes::new(__input)
7633        };
7634        let mut __struct = Self::default();
7635        __struct.time_boot_ms = buf.get_u32_le()?;
7636        __struct.max = buf.get_f32_le()?;
7637        __struct.max_point_x = buf.get_f32_le()?;
7638        __struct.max_point_y = buf.get_f32_le()?;
7639        __struct.min = buf.get_f32_le()?;
7640        __struct.min_point_x = buf.get_f32_le()?;
7641        __struct.min_point_y = buf.get_f32_le()?;
7642        __struct.stream_id = buf.get_u8()?;
7643        __struct.camera_device_id = buf.get_u8()?;
7644        Ok(__struct)
7645    }
7646    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7647        let mut __tmp = BytesMut::new(bytes);
7648        #[allow(clippy::absurd_extreme_comparisons)]
7649        #[allow(unused_comparisons)]
7650        if __tmp.remaining() < Self::ENCODED_LEN {
7651            panic!(
7652                "buffer is too small (need {} bytes, but got {})",
7653                Self::ENCODED_LEN,
7654                __tmp.remaining(),
7655            )
7656        }
7657        __tmp.put_u32_le(self.time_boot_ms);
7658        __tmp.put_f32_le(self.max);
7659        __tmp.put_f32_le(self.max_point_x);
7660        __tmp.put_f32_le(self.max_point_y);
7661        __tmp.put_f32_le(self.min);
7662        __tmp.put_f32_le(self.min_point_x);
7663        __tmp.put_f32_le(self.min_point_y);
7664        __tmp.put_u8(self.stream_id);
7665        __tmp.put_u8(self.camera_device_id);
7666        if matches!(version, MavlinkVersion::V2) {
7667            let len = __tmp.len();
7668            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7669        } else {
7670            __tmp.len()
7671        }
7672    }
7673}
7674#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7675#[doc = ""]
7676#[doc = "ID: 276"]
7677#[derive(Debug, Clone, PartialEq)]
7678#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7680#[cfg_attr(feature = "ts", derive(TS))]
7681#[cfg_attr(feature = "ts", ts(export))]
7682pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7683    #[doc = "Latitude of tracked object"]
7684    pub lat: i32,
7685    #[doc = "Longitude of tracked object"]
7686    pub lon: i32,
7687    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7688    pub alt: f32,
7689    #[doc = "Horizontal accuracy. NAN if unknown"]
7690    pub h_acc: f32,
7691    #[doc = "Vertical accuracy. NAN if unknown"]
7692    pub v_acc: f32,
7693    #[doc = "North velocity of tracked object. NAN if unknown"]
7694    pub vel_n: f32,
7695    #[doc = "East velocity of tracked object. NAN if unknown"]
7696    pub vel_e: f32,
7697    #[doc = "Down velocity of tracked object. NAN if unknown"]
7698    pub vel_d: f32,
7699    #[doc = "Velocity accuracy. NAN if unknown"]
7700    pub vel_acc: f32,
7701    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7702    pub dist: f32,
7703    #[doc = "Heading in radians, in NED. NAN if unknown"]
7704    pub hdg: f32,
7705    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7706    pub hdg_acc: f32,
7707    #[doc = "Current tracking status"]
7708    pub tracking_status: CameraTrackingStatusFlags,
7709    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7710    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7711    pub camera_device_id: u8,
7712}
7713impl CAMERA_TRACKING_GEO_STATUS_DATA {
7714    pub const ENCODED_LEN: usize = 50usize;
7715    pub const DEFAULT: Self = Self {
7716        lat: 0_i32,
7717        lon: 0_i32,
7718        alt: 0.0_f32,
7719        h_acc: 0.0_f32,
7720        v_acc: 0.0_f32,
7721        vel_n: 0.0_f32,
7722        vel_e: 0.0_f32,
7723        vel_d: 0.0_f32,
7724        vel_acc: 0.0_f32,
7725        dist: 0.0_f32,
7726        hdg: 0.0_f32,
7727        hdg_acc: 0.0_f32,
7728        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7729        camera_device_id: 0_u8,
7730    };
7731    #[cfg(feature = "arbitrary")]
7732    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7733        use arbitrary::{Arbitrary, Unstructured};
7734        let mut buf = [0u8; 1024];
7735        rng.fill_bytes(&mut buf);
7736        let mut unstructured = Unstructured::new(&buf);
7737        Self::arbitrary(&mut unstructured).unwrap_or_default()
7738    }
7739}
7740impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7741    fn default() -> Self {
7742        Self::DEFAULT.clone()
7743    }
7744}
7745impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7746    type Message = MavMessage;
7747    const ID: u32 = 276u32;
7748    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7749    const EXTRA_CRC: u8 = 18u8;
7750    const ENCODED_LEN: usize = 50usize;
7751    fn deser(
7752        _version: MavlinkVersion,
7753        __input: &[u8],
7754    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7755        let avail_len = __input.len();
7756        let mut payload_buf = [0; Self::ENCODED_LEN];
7757        let mut buf = if avail_len < Self::ENCODED_LEN {
7758            payload_buf[0..avail_len].copy_from_slice(__input);
7759            Bytes::new(&payload_buf)
7760        } else {
7761            Bytes::new(__input)
7762        };
7763        let mut __struct = Self::default();
7764        __struct.lat = buf.get_i32_le()?;
7765        __struct.lon = buf.get_i32_le()?;
7766        __struct.alt = buf.get_f32_le()?;
7767        __struct.h_acc = buf.get_f32_le()?;
7768        __struct.v_acc = buf.get_f32_le()?;
7769        __struct.vel_n = buf.get_f32_le()?;
7770        __struct.vel_e = buf.get_f32_le()?;
7771        __struct.vel_d = buf.get_f32_le()?;
7772        __struct.vel_acc = buf.get_f32_le()?;
7773        __struct.dist = buf.get_f32_le()?;
7774        __struct.hdg = buf.get_f32_le()?;
7775        __struct.hdg_acc = buf.get_f32_le()?;
7776        let tmp = buf.get_u8()?;
7777        __struct.tracking_status =
7778            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7779                enum_type: "CameraTrackingStatusFlags",
7780                value: tmp as u64,
7781            })?;
7782        __struct.camera_device_id = buf.get_u8()?;
7783        Ok(__struct)
7784    }
7785    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7786        let mut __tmp = BytesMut::new(bytes);
7787        #[allow(clippy::absurd_extreme_comparisons)]
7788        #[allow(unused_comparisons)]
7789        if __tmp.remaining() < Self::ENCODED_LEN {
7790            panic!(
7791                "buffer is too small (need {} bytes, but got {})",
7792                Self::ENCODED_LEN,
7793                __tmp.remaining(),
7794            )
7795        }
7796        __tmp.put_i32_le(self.lat);
7797        __tmp.put_i32_le(self.lon);
7798        __tmp.put_f32_le(self.alt);
7799        __tmp.put_f32_le(self.h_acc);
7800        __tmp.put_f32_le(self.v_acc);
7801        __tmp.put_f32_le(self.vel_n);
7802        __tmp.put_f32_le(self.vel_e);
7803        __tmp.put_f32_le(self.vel_d);
7804        __tmp.put_f32_le(self.vel_acc);
7805        __tmp.put_f32_le(self.dist);
7806        __tmp.put_f32_le(self.hdg);
7807        __tmp.put_f32_le(self.hdg_acc);
7808        __tmp.put_u8(self.tracking_status as u8);
7809        if matches!(version, MavlinkVersion::V2) {
7810            __tmp.put_u8(self.camera_device_id);
7811            let len = __tmp.len();
7812            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7813        } else {
7814            __tmp.len()
7815        }
7816    }
7817}
7818#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7819#[doc = ""]
7820#[doc = "ID: 275"]
7821#[derive(Debug, Clone, PartialEq)]
7822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7824#[cfg_attr(feature = "ts", derive(TS))]
7825#[cfg_attr(feature = "ts", ts(export))]
7826pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7827    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7828    pub point_x: f32,
7829    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7830    pub point_y: f32,
7831    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7832    pub radius: f32,
7833    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7834    pub rec_top_x: f32,
7835    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7836    pub rec_top_y: f32,
7837    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7838    pub rec_bottom_x: f32,
7839    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7840    pub rec_bottom_y: f32,
7841    #[doc = "Current tracking status"]
7842    pub tracking_status: CameraTrackingStatusFlags,
7843    #[doc = "Current tracking mode"]
7844    pub tracking_mode: CameraTrackingMode,
7845    #[doc = "Defines location of target data"]
7846    pub target_data: CameraTrackingTargetData,
7847    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7848    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7849    pub camera_device_id: u8,
7850}
7851impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7852    pub const ENCODED_LEN: usize = 32usize;
7853    pub const DEFAULT: Self = Self {
7854        point_x: 0.0_f32,
7855        point_y: 0.0_f32,
7856        radius: 0.0_f32,
7857        rec_top_x: 0.0_f32,
7858        rec_top_y: 0.0_f32,
7859        rec_bottom_x: 0.0_f32,
7860        rec_bottom_y: 0.0_f32,
7861        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7862        tracking_mode: CameraTrackingMode::DEFAULT,
7863        target_data: CameraTrackingTargetData::DEFAULT,
7864        camera_device_id: 0_u8,
7865    };
7866    #[cfg(feature = "arbitrary")]
7867    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7868        use arbitrary::{Arbitrary, Unstructured};
7869        let mut buf = [0u8; 1024];
7870        rng.fill_bytes(&mut buf);
7871        let mut unstructured = Unstructured::new(&buf);
7872        Self::arbitrary(&mut unstructured).unwrap_or_default()
7873    }
7874}
7875impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7876    fn default() -> Self {
7877        Self::DEFAULT.clone()
7878    }
7879}
7880impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7881    type Message = MavMessage;
7882    const ID: u32 = 275u32;
7883    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7884    const EXTRA_CRC: u8 = 126u8;
7885    const ENCODED_LEN: usize = 32usize;
7886    fn deser(
7887        _version: MavlinkVersion,
7888        __input: &[u8],
7889    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7890        let avail_len = __input.len();
7891        let mut payload_buf = [0; Self::ENCODED_LEN];
7892        let mut buf = if avail_len < Self::ENCODED_LEN {
7893            payload_buf[0..avail_len].copy_from_slice(__input);
7894            Bytes::new(&payload_buf)
7895        } else {
7896            Bytes::new(__input)
7897        };
7898        let mut __struct = Self::default();
7899        __struct.point_x = buf.get_f32_le()?;
7900        __struct.point_y = buf.get_f32_le()?;
7901        __struct.radius = buf.get_f32_le()?;
7902        __struct.rec_top_x = buf.get_f32_le()?;
7903        __struct.rec_top_y = buf.get_f32_le()?;
7904        __struct.rec_bottom_x = buf.get_f32_le()?;
7905        __struct.rec_bottom_y = buf.get_f32_le()?;
7906        let tmp = buf.get_u8()?;
7907        __struct.tracking_status =
7908            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7909                enum_type: "CameraTrackingStatusFlags",
7910                value: tmp as u64,
7911            })?;
7912        let tmp = buf.get_u8()?;
7913        __struct.tracking_mode =
7914            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7915                enum_type: "CameraTrackingMode",
7916                value: tmp as u64,
7917            })?;
7918        let tmp = buf.get_u8()?;
7919        __struct.target_data =
7920            CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
7921                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7922                flag_type: "CameraTrackingTargetData",
7923                value: tmp as u64,
7924            })?;
7925        __struct.camera_device_id = buf.get_u8()?;
7926        Ok(__struct)
7927    }
7928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7929        let mut __tmp = BytesMut::new(bytes);
7930        #[allow(clippy::absurd_extreme_comparisons)]
7931        #[allow(unused_comparisons)]
7932        if __tmp.remaining() < Self::ENCODED_LEN {
7933            panic!(
7934                "buffer is too small (need {} bytes, but got {})",
7935                Self::ENCODED_LEN,
7936                __tmp.remaining(),
7937            )
7938        }
7939        __tmp.put_f32_le(self.point_x);
7940        __tmp.put_f32_le(self.point_y);
7941        __tmp.put_f32_le(self.radius);
7942        __tmp.put_f32_le(self.rec_top_x);
7943        __tmp.put_f32_le(self.rec_top_y);
7944        __tmp.put_f32_le(self.rec_bottom_x);
7945        __tmp.put_f32_le(self.rec_bottom_y);
7946        __tmp.put_u8(self.tracking_status as u8);
7947        __tmp.put_u8(self.tracking_mode as u8);
7948        __tmp.put_u8(self.target_data.bits() as u8);
7949        if matches!(version, MavlinkVersion::V2) {
7950            __tmp.put_u8(self.camera_device_id);
7951            let len = __tmp.len();
7952            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7953        } else {
7954            __tmp.len()
7955        }
7956    }
7957}
7958#[doc = "Camera-IMU triggering and synchronisation message."]
7959#[doc = ""]
7960#[doc = "ID: 112"]
7961#[derive(Debug, Clone, PartialEq)]
7962#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7964#[cfg_attr(feature = "ts", derive(TS))]
7965#[cfg_attr(feature = "ts", ts(export))]
7966pub struct CAMERA_TRIGGER_DATA {
7967    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7968    pub time_usec: u64,
7969    #[doc = "Image frame sequence"]
7970    pub seq: u32,
7971}
7972impl CAMERA_TRIGGER_DATA {
7973    pub const ENCODED_LEN: usize = 12usize;
7974    pub const DEFAULT: Self = Self {
7975        time_usec: 0_u64,
7976        seq: 0_u32,
7977    };
7978    #[cfg(feature = "arbitrary")]
7979    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7980        use arbitrary::{Arbitrary, Unstructured};
7981        let mut buf = [0u8; 1024];
7982        rng.fill_bytes(&mut buf);
7983        let mut unstructured = Unstructured::new(&buf);
7984        Self::arbitrary(&mut unstructured).unwrap_or_default()
7985    }
7986}
7987impl Default for CAMERA_TRIGGER_DATA {
7988    fn default() -> Self {
7989        Self::DEFAULT.clone()
7990    }
7991}
7992impl MessageData for CAMERA_TRIGGER_DATA {
7993    type Message = MavMessage;
7994    const ID: u32 = 112u32;
7995    const NAME: &'static str = "CAMERA_TRIGGER";
7996    const EXTRA_CRC: u8 = 174u8;
7997    const ENCODED_LEN: usize = 12usize;
7998    fn deser(
7999        _version: MavlinkVersion,
8000        __input: &[u8],
8001    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8002        let avail_len = __input.len();
8003        let mut payload_buf = [0; Self::ENCODED_LEN];
8004        let mut buf = if avail_len < Self::ENCODED_LEN {
8005            payload_buf[0..avail_len].copy_from_slice(__input);
8006            Bytes::new(&payload_buf)
8007        } else {
8008            Bytes::new(__input)
8009        };
8010        let mut __struct = Self::default();
8011        __struct.time_usec = buf.get_u64_le()?;
8012        __struct.seq = buf.get_u32_le()?;
8013        Ok(__struct)
8014    }
8015    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8016        let mut __tmp = BytesMut::new(bytes);
8017        #[allow(clippy::absurd_extreme_comparisons)]
8018        #[allow(unused_comparisons)]
8019        if __tmp.remaining() < Self::ENCODED_LEN {
8020            panic!(
8021                "buffer is too small (need {} bytes, but got {})",
8022                Self::ENCODED_LEN,
8023                __tmp.remaining(),
8024            )
8025        }
8026        __tmp.put_u64_le(self.time_usec);
8027        __tmp.put_u32_le(self.seq);
8028        if matches!(version, MavlinkVersion::V2) {
8029            let len = __tmp.len();
8030            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8031        } else {
8032            __tmp.len()
8033        }
8034    }
8035}
8036#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8037#[doc = ""]
8038#[doc = "ID: 387"]
8039#[derive(Debug, Clone, PartialEq)]
8040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8042#[cfg_attr(feature = "ts", derive(TS))]
8043#[cfg_attr(feature = "ts", ts(export))]
8044pub struct CANFD_FRAME_DATA {
8045    #[doc = "Frame ID"]
8046    pub id: u32,
8047    #[doc = "System ID."]
8048    pub target_system: u8,
8049    #[doc = "Component ID."]
8050    pub target_component: u8,
8051    #[doc = "bus number"]
8052    pub bus: u8,
8053    #[doc = "Frame length"]
8054    pub len: u8,
8055    #[doc = "Frame data"]
8056    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8057    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8058    pub data: [u8; 64],
8059}
8060impl CANFD_FRAME_DATA {
8061    pub const ENCODED_LEN: usize = 72usize;
8062    pub const DEFAULT: Self = Self {
8063        id: 0_u32,
8064        target_system: 0_u8,
8065        target_component: 0_u8,
8066        bus: 0_u8,
8067        len: 0_u8,
8068        data: [0_u8; 64usize],
8069    };
8070    #[cfg(feature = "arbitrary")]
8071    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8072        use arbitrary::{Arbitrary, Unstructured};
8073        let mut buf = [0u8; 1024];
8074        rng.fill_bytes(&mut buf);
8075        let mut unstructured = Unstructured::new(&buf);
8076        Self::arbitrary(&mut unstructured).unwrap_or_default()
8077    }
8078}
8079impl Default for CANFD_FRAME_DATA {
8080    fn default() -> Self {
8081        Self::DEFAULT.clone()
8082    }
8083}
8084impl MessageData for CANFD_FRAME_DATA {
8085    type Message = MavMessage;
8086    const ID: u32 = 387u32;
8087    const NAME: &'static str = "CANFD_FRAME";
8088    const EXTRA_CRC: u8 = 4u8;
8089    const ENCODED_LEN: usize = 72usize;
8090    fn deser(
8091        _version: MavlinkVersion,
8092        __input: &[u8],
8093    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8094        let avail_len = __input.len();
8095        let mut payload_buf = [0; Self::ENCODED_LEN];
8096        let mut buf = if avail_len < Self::ENCODED_LEN {
8097            payload_buf[0..avail_len].copy_from_slice(__input);
8098            Bytes::new(&payload_buf)
8099        } else {
8100            Bytes::new(__input)
8101        };
8102        let mut __struct = Self::default();
8103        __struct.id = buf.get_u32_le()?;
8104        __struct.target_system = buf.get_u8()?;
8105        __struct.target_component = buf.get_u8()?;
8106        __struct.bus = buf.get_u8()?;
8107        __struct.len = buf.get_u8()?;
8108        for v in &mut __struct.data {
8109            let val = buf.get_u8()?;
8110            *v = val;
8111        }
8112        Ok(__struct)
8113    }
8114    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8115        let mut __tmp = BytesMut::new(bytes);
8116        #[allow(clippy::absurd_extreme_comparisons)]
8117        #[allow(unused_comparisons)]
8118        if __tmp.remaining() < Self::ENCODED_LEN {
8119            panic!(
8120                "buffer is too small (need {} bytes, but got {})",
8121                Self::ENCODED_LEN,
8122                __tmp.remaining(),
8123            )
8124        }
8125        __tmp.put_u32_le(self.id);
8126        __tmp.put_u8(self.target_system);
8127        __tmp.put_u8(self.target_component);
8128        __tmp.put_u8(self.bus);
8129        __tmp.put_u8(self.len);
8130        for val in &self.data {
8131            __tmp.put_u8(*val);
8132        }
8133        if matches!(version, MavlinkVersion::V2) {
8134            let len = __tmp.len();
8135            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8136        } else {
8137            __tmp.len()
8138        }
8139    }
8140}
8141#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8142#[doc = ""]
8143#[doc = "ID: 388"]
8144#[derive(Debug, Clone, PartialEq)]
8145#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8146#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8147#[cfg_attr(feature = "ts", derive(TS))]
8148#[cfg_attr(feature = "ts", ts(export))]
8149pub struct CAN_FILTER_MODIFY_DATA {
8150    #[doc = "filter IDs, length num_ids"]
8151    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8152    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8153    pub ids: [u16; 16],
8154    #[doc = "System ID."]
8155    pub target_system: u8,
8156    #[doc = "Component ID."]
8157    pub target_component: u8,
8158    #[doc = "bus number"]
8159    pub bus: u8,
8160    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8161    pub operation: CanFilterOp,
8162    #[doc = "number of IDs in filter list"]
8163    pub num_ids: u8,
8164}
8165impl CAN_FILTER_MODIFY_DATA {
8166    pub const ENCODED_LEN: usize = 37usize;
8167    pub const DEFAULT: Self = Self {
8168        ids: [0_u16; 16usize],
8169        target_system: 0_u8,
8170        target_component: 0_u8,
8171        bus: 0_u8,
8172        operation: CanFilterOp::DEFAULT,
8173        num_ids: 0_u8,
8174    };
8175    #[cfg(feature = "arbitrary")]
8176    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8177        use arbitrary::{Arbitrary, Unstructured};
8178        let mut buf = [0u8; 1024];
8179        rng.fill_bytes(&mut buf);
8180        let mut unstructured = Unstructured::new(&buf);
8181        Self::arbitrary(&mut unstructured).unwrap_or_default()
8182    }
8183}
8184impl Default for CAN_FILTER_MODIFY_DATA {
8185    fn default() -> Self {
8186        Self::DEFAULT.clone()
8187    }
8188}
8189impl MessageData for CAN_FILTER_MODIFY_DATA {
8190    type Message = MavMessage;
8191    const ID: u32 = 388u32;
8192    const NAME: &'static str = "CAN_FILTER_MODIFY";
8193    const EXTRA_CRC: u8 = 8u8;
8194    const ENCODED_LEN: usize = 37usize;
8195    fn deser(
8196        _version: MavlinkVersion,
8197        __input: &[u8],
8198    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8199        let avail_len = __input.len();
8200        let mut payload_buf = [0; Self::ENCODED_LEN];
8201        let mut buf = if avail_len < Self::ENCODED_LEN {
8202            payload_buf[0..avail_len].copy_from_slice(__input);
8203            Bytes::new(&payload_buf)
8204        } else {
8205            Bytes::new(__input)
8206        };
8207        let mut __struct = Self::default();
8208        for v in &mut __struct.ids {
8209            let val = buf.get_u16_le()?;
8210            *v = val;
8211        }
8212        __struct.target_system = buf.get_u8()?;
8213        __struct.target_component = buf.get_u8()?;
8214        __struct.bus = buf.get_u8()?;
8215        let tmp = buf.get_u8()?;
8216        __struct.operation =
8217            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8218                enum_type: "CanFilterOp",
8219                value: tmp as u64,
8220            })?;
8221        __struct.num_ids = buf.get_u8()?;
8222        Ok(__struct)
8223    }
8224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8225        let mut __tmp = BytesMut::new(bytes);
8226        #[allow(clippy::absurd_extreme_comparisons)]
8227        #[allow(unused_comparisons)]
8228        if __tmp.remaining() < Self::ENCODED_LEN {
8229            panic!(
8230                "buffer is too small (need {} bytes, but got {})",
8231                Self::ENCODED_LEN,
8232                __tmp.remaining(),
8233            )
8234        }
8235        for val in &self.ids {
8236            __tmp.put_u16_le(*val);
8237        }
8238        __tmp.put_u8(self.target_system);
8239        __tmp.put_u8(self.target_component);
8240        __tmp.put_u8(self.bus);
8241        __tmp.put_u8(self.operation as u8);
8242        __tmp.put_u8(self.num_ids);
8243        if matches!(version, MavlinkVersion::V2) {
8244            let len = __tmp.len();
8245            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8246        } else {
8247            __tmp.len()
8248        }
8249    }
8250}
8251#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8252#[doc = ""]
8253#[doc = "ID: 386"]
8254#[derive(Debug, Clone, PartialEq)]
8255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8257#[cfg_attr(feature = "ts", derive(TS))]
8258#[cfg_attr(feature = "ts", ts(export))]
8259pub struct CAN_FRAME_DATA {
8260    #[doc = "Frame ID"]
8261    pub id: u32,
8262    #[doc = "System ID."]
8263    pub target_system: u8,
8264    #[doc = "Component ID."]
8265    pub target_component: u8,
8266    #[doc = "Bus number"]
8267    pub bus: u8,
8268    #[doc = "Frame length"]
8269    pub len: u8,
8270    #[doc = "Frame data"]
8271    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8272    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8273    pub data: [u8; 8],
8274}
8275impl CAN_FRAME_DATA {
8276    pub const ENCODED_LEN: usize = 16usize;
8277    pub const DEFAULT: Self = Self {
8278        id: 0_u32,
8279        target_system: 0_u8,
8280        target_component: 0_u8,
8281        bus: 0_u8,
8282        len: 0_u8,
8283        data: [0_u8; 8usize],
8284    };
8285    #[cfg(feature = "arbitrary")]
8286    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8287        use arbitrary::{Arbitrary, Unstructured};
8288        let mut buf = [0u8; 1024];
8289        rng.fill_bytes(&mut buf);
8290        let mut unstructured = Unstructured::new(&buf);
8291        Self::arbitrary(&mut unstructured).unwrap_or_default()
8292    }
8293}
8294impl Default for CAN_FRAME_DATA {
8295    fn default() -> Self {
8296        Self::DEFAULT.clone()
8297    }
8298}
8299impl MessageData for CAN_FRAME_DATA {
8300    type Message = MavMessage;
8301    const ID: u32 = 386u32;
8302    const NAME: &'static str = "CAN_FRAME";
8303    const EXTRA_CRC: u8 = 132u8;
8304    const ENCODED_LEN: usize = 16usize;
8305    fn deser(
8306        _version: MavlinkVersion,
8307        __input: &[u8],
8308    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8309        let avail_len = __input.len();
8310        let mut payload_buf = [0; Self::ENCODED_LEN];
8311        let mut buf = if avail_len < Self::ENCODED_LEN {
8312            payload_buf[0..avail_len].copy_from_slice(__input);
8313            Bytes::new(&payload_buf)
8314        } else {
8315            Bytes::new(__input)
8316        };
8317        let mut __struct = Self::default();
8318        __struct.id = buf.get_u32_le()?;
8319        __struct.target_system = buf.get_u8()?;
8320        __struct.target_component = buf.get_u8()?;
8321        __struct.bus = buf.get_u8()?;
8322        __struct.len = buf.get_u8()?;
8323        for v in &mut __struct.data {
8324            let val = buf.get_u8()?;
8325            *v = val;
8326        }
8327        Ok(__struct)
8328    }
8329    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8330        let mut __tmp = BytesMut::new(bytes);
8331        #[allow(clippy::absurd_extreme_comparisons)]
8332        #[allow(unused_comparisons)]
8333        if __tmp.remaining() < Self::ENCODED_LEN {
8334            panic!(
8335                "buffer is too small (need {} bytes, but got {})",
8336                Self::ENCODED_LEN,
8337                __tmp.remaining(),
8338            )
8339        }
8340        __tmp.put_u32_le(self.id);
8341        __tmp.put_u8(self.target_system);
8342        __tmp.put_u8(self.target_component);
8343        __tmp.put_u8(self.bus);
8344        __tmp.put_u8(self.len);
8345        for val in &self.data {
8346            __tmp.put_u8(*val);
8347        }
8348        if matches!(version, MavlinkVersion::V2) {
8349            let len = __tmp.len();
8350            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8351        } else {
8352            __tmp.len()
8353        }
8354    }
8355}
8356#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8357#[doc = ""]
8358#[doc = "ID: 336"]
8359#[derive(Debug, Clone, PartialEq)]
8360#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8361#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8362#[cfg_attr(feature = "ts", derive(TS))]
8363#[cfg_attr(feature = "ts", ts(export))]
8364pub struct CELLULAR_CONFIG_DATA {
8365    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8366    pub enable_lte: u8,
8367    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8368    pub enable_pin: u8,
8369    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8370    #[cfg_attr(feature = "ts", ts(type = "string"))]
8371    pub pin: CharArray<16>,
8372    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8373    #[cfg_attr(feature = "ts", ts(type = "string"))]
8374    pub new_pin: CharArray<16>,
8375    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8376    #[cfg_attr(feature = "ts", ts(type = "string"))]
8377    pub apn: CharArray<32>,
8378    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8379    #[cfg_attr(feature = "ts", ts(type = "string"))]
8380    pub puk: CharArray<16>,
8381    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8382    pub roaming: u8,
8383    #[doc = "Message acceptance response (sent back to GS)."]
8384    pub response: CellularConfigResponse,
8385}
8386impl CELLULAR_CONFIG_DATA {
8387    pub const ENCODED_LEN: usize = 84usize;
8388    pub const DEFAULT: Self = Self {
8389        enable_lte: 0_u8,
8390        enable_pin: 0_u8,
8391        pin: CharArray::new([0_u8; 16usize]),
8392        new_pin: CharArray::new([0_u8; 16usize]),
8393        apn: CharArray::new([0_u8; 32usize]),
8394        puk: CharArray::new([0_u8; 16usize]),
8395        roaming: 0_u8,
8396        response: CellularConfigResponse::DEFAULT,
8397    };
8398    #[cfg(feature = "arbitrary")]
8399    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8400        use arbitrary::{Arbitrary, Unstructured};
8401        let mut buf = [0u8; 1024];
8402        rng.fill_bytes(&mut buf);
8403        let mut unstructured = Unstructured::new(&buf);
8404        Self::arbitrary(&mut unstructured).unwrap_or_default()
8405    }
8406}
8407impl Default for CELLULAR_CONFIG_DATA {
8408    fn default() -> Self {
8409        Self::DEFAULT.clone()
8410    }
8411}
8412impl MessageData for CELLULAR_CONFIG_DATA {
8413    type Message = MavMessage;
8414    const ID: u32 = 336u32;
8415    const NAME: &'static str = "CELLULAR_CONFIG";
8416    const EXTRA_CRC: u8 = 245u8;
8417    const ENCODED_LEN: usize = 84usize;
8418    fn deser(
8419        _version: MavlinkVersion,
8420        __input: &[u8],
8421    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8422        let avail_len = __input.len();
8423        let mut payload_buf = [0; Self::ENCODED_LEN];
8424        let mut buf = if avail_len < Self::ENCODED_LEN {
8425            payload_buf[0..avail_len].copy_from_slice(__input);
8426            Bytes::new(&payload_buf)
8427        } else {
8428            Bytes::new(__input)
8429        };
8430        let mut __struct = Self::default();
8431        __struct.enable_lte = buf.get_u8()?;
8432        __struct.enable_pin = buf.get_u8()?;
8433        let mut tmp = [0_u8; 16usize];
8434        for v in &mut tmp {
8435            *v = buf.get_u8()?;
8436        }
8437        __struct.pin = CharArray::new(tmp);
8438        let mut tmp = [0_u8; 16usize];
8439        for v in &mut tmp {
8440            *v = buf.get_u8()?;
8441        }
8442        __struct.new_pin = CharArray::new(tmp);
8443        let mut tmp = [0_u8; 32usize];
8444        for v in &mut tmp {
8445            *v = buf.get_u8()?;
8446        }
8447        __struct.apn = CharArray::new(tmp);
8448        let mut tmp = [0_u8; 16usize];
8449        for v in &mut tmp {
8450            *v = buf.get_u8()?;
8451        }
8452        __struct.puk = CharArray::new(tmp);
8453        __struct.roaming = buf.get_u8()?;
8454        let tmp = buf.get_u8()?;
8455        __struct.response =
8456            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8457                enum_type: "CellularConfigResponse",
8458                value: tmp as u64,
8459            })?;
8460        Ok(__struct)
8461    }
8462    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8463        let mut __tmp = BytesMut::new(bytes);
8464        #[allow(clippy::absurd_extreme_comparisons)]
8465        #[allow(unused_comparisons)]
8466        if __tmp.remaining() < Self::ENCODED_LEN {
8467            panic!(
8468                "buffer is too small (need {} bytes, but got {})",
8469                Self::ENCODED_LEN,
8470                __tmp.remaining(),
8471            )
8472        }
8473        __tmp.put_u8(self.enable_lte);
8474        __tmp.put_u8(self.enable_pin);
8475        for val in &self.pin {
8476            __tmp.put_u8(*val);
8477        }
8478        for val in &self.new_pin {
8479            __tmp.put_u8(*val);
8480        }
8481        for val in &self.apn {
8482            __tmp.put_u8(*val);
8483        }
8484        for val in &self.puk {
8485            __tmp.put_u8(*val);
8486        }
8487        __tmp.put_u8(self.roaming);
8488        __tmp.put_u8(self.response as u8);
8489        if matches!(version, MavlinkVersion::V2) {
8490            let len = __tmp.len();
8491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8492        } else {
8493            __tmp.len()
8494        }
8495    }
8496}
8497#[doc = "Report current used cellular network status."]
8498#[doc = ""]
8499#[doc = "ID: 334"]
8500#[derive(Debug, Clone, PartialEq)]
8501#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8502#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8503#[cfg_attr(feature = "ts", derive(TS))]
8504#[cfg_attr(feature = "ts", ts(export))]
8505pub struct CELLULAR_STATUS_DATA {
8506    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8507    pub mcc: u16,
8508    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8509    pub mnc: u16,
8510    #[doc = "Location area code. If unknown, set to 0"]
8511    pub lac: u16,
8512    #[doc = "Cellular modem status"]
8513    pub status: CellularStatusFlag,
8514    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8515    pub failure_reason: CellularNetworkFailedReason,
8516    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8517    pub mavtype: CellularNetworkRadioType,
8518    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8519    pub quality: u8,
8520}
8521impl CELLULAR_STATUS_DATA {
8522    pub const ENCODED_LEN: usize = 10usize;
8523    pub const DEFAULT: Self = Self {
8524        mcc: 0_u16,
8525        mnc: 0_u16,
8526        lac: 0_u16,
8527        status: CellularStatusFlag::DEFAULT,
8528        failure_reason: CellularNetworkFailedReason::DEFAULT,
8529        mavtype: CellularNetworkRadioType::DEFAULT,
8530        quality: 0_u8,
8531    };
8532    #[cfg(feature = "arbitrary")]
8533    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8534        use arbitrary::{Arbitrary, Unstructured};
8535        let mut buf = [0u8; 1024];
8536        rng.fill_bytes(&mut buf);
8537        let mut unstructured = Unstructured::new(&buf);
8538        Self::arbitrary(&mut unstructured).unwrap_or_default()
8539    }
8540}
8541impl Default for CELLULAR_STATUS_DATA {
8542    fn default() -> Self {
8543        Self::DEFAULT.clone()
8544    }
8545}
8546impl MessageData for CELLULAR_STATUS_DATA {
8547    type Message = MavMessage;
8548    const ID: u32 = 334u32;
8549    const NAME: &'static str = "CELLULAR_STATUS";
8550    const EXTRA_CRC: u8 = 72u8;
8551    const ENCODED_LEN: usize = 10usize;
8552    fn deser(
8553        _version: MavlinkVersion,
8554        __input: &[u8],
8555    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8556        let avail_len = __input.len();
8557        let mut payload_buf = [0; Self::ENCODED_LEN];
8558        let mut buf = if avail_len < Self::ENCODED_LEN {
8559            payload_buf[0..avail_len].copy_from_slice(__input);
8560            Bytes::new(&payload_buf)
8561        } else {
8562            Bytes::new(__input)
8563        };
8564        let mut __struct = Self::default();
8565        __struct.mcc = buf.get_u16_le()?;
8566        __struct.mnc = buf.get_u16_le()?;
8567        __struct.lac = buf.get_u16_le()?;
8568        let tmp = buf.get_u8()?;
8569        __struct.status =
8570            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8571                enum_type: "CellularStatusFlag",
8572                value: tmp as u64,
8573            })?;
8574        let tmp = buf.get_u8()?;
8575        __struct.failure_reason =
8576            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8577                enum_type: "CellularNetworkFailedReason",
8578                value: tmp as u64,
8579            })?;
8580        let tmp = buf.get_u8()?;
8581        __struct.mavtype =
8582            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8583                enum_type: "CellularNetworkRadioType",
8584                value: tmp as u64,
8585            })?;
8586        __struct.quality = buf.get_u8()?;
8587        Ok(__struct)
8588    }
8589    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8590        let mut __tmp = BytesMut::new(bytes);
8591        #[allow(clippy::absurd_extreme_comparisons)]
8592        #[allow(unused_comparisons)]
8593        if __tmp.remaining() < Self::ENCODED_LEN {
8594            panic!(
8595                "buffer is too small (need {} bytes, but got {})",
8596                Self::ENCODED_LEN,
8597                __tmp.remaining(),
8598            )
8599        }
8600        __tmp.put_u16_le(self.mcc);
8601        __tmp.put_u16_le(self.mnc);
8602        __tmp.put_u16_le(self.lac);
8603        __tmp.put_u8(self.status as u8);
8604        __tmp.put_u8(self.failure_reason as u8);
8605        __tmp.put_u8(self.mavtype as u8);
8606        __tmp.put_u8(self.quality);
8607        if matches!(version, MavlinkVersion::V2) {
8608            let len = __tmp.len();
8609            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8610        } else {
8611            __tmp.len()
8612        }
8613    }
8614}
8615#[doc = "Request to control this MAV."]
8616#[doc = ""]
8617#[doc = "ID: 5"]
8618#[derive(Debug, Clone, PartialEq)]
8619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8621#[cfg_attr(feature = "ts", derive(TS))]
8622#[cfg_attr(feature = "ts", ts(export))]
8623pub struct CHANGE_OPERATOR_CONTROL_DATA {
8624    #[doc = "System the GCS requests control for"]
8625    pub target_system: u8,
8626    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8627    pub control_request: u8,
8628    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8629    pub version: u8,
8630    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8631    #[cfg_attr(feature = "ts", ts(type = "string"))]
8632    pub passkey: CharArray<25>,
8633}
8634impl CHANGE_OPERATOR_CONTROL_DATA {
8635    pub const ENCODED_LEN: usize = 28usize;
8636    pub const DEFAULT: Self = Self {
8637        target_system: 0_u8,
8638        control_request: 0_u8,
8639        version: 0_u8,
8640        passkey: CharArray::new([0_u8; 25usize]),
8641    };
8642    #[cfg(feature = "arbitrary")]
8643    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8644        use arbitrary::{Arbitrary, Unstructured};
8645        let mut buf = [0u8; 1024];
8646        rng.fill_bytes(&mut buf);
8647        let mut unstructured = Unstructured::new(&buf);
8648        Self::arbitrary(&mut unstructured).unwrap_or_default()
8649    }
8650}
8651impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8652    fn default() -> Self {
8653        Self::DEFAULT.clone()
8654    }
8655}
8656impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8657    type Message = MavMessage;
8658    const ID: u32 = 5u32;
8659    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8660    const EXTRA_CRC: u8 = 217u8;
8661    const ENCODED_LEN: usize = 28usize;
8662    fn deser(
8663        _version: MavlinkVersion,
8664        __input: &[u8],
8665    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8666        let avail_len = __input.len();
8667        let mut payload_buf = [0; Self::ENCODED_LEN];
8668        let mut buf = if avail_len < Self::ENCODED_LEN {
8669            payload_buf[0..avail_len].copy_from_slice(__input);
8670            Bytes::new(&payload_buf)
8671        } else {
8672            Bytes::new(__input)
8673        };
8674        let mut __struct = Self::default();
8675        __struct.target_system = buf.get_u8()?;
8676        __struct.control_request = buf.get_u8()?;
8677        __struct.version = buf.get_u8()?;
8678        let mut tmp = [0_u8; 25usize];
8679        for v in &mut tmp {
8680            *v = buf.get_u8()?;
8681        }
8682        __struct.passkey = CharArray::new(tmp);
8683        Ok(__struct)
8684    }
8685    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8686        let mut __tmp = BytesMut::new(bytes);
8687        #[allow(clippy::absurd_extreme_comparisons)]
8688        #[allow(unused_comparisons)]
8689        if __tmp.remaining() < Self::ENCODED_LEN {
8690            panic!(
8691                "buffer is too small (need {} bytes, but got {})",
8692                Self::ENCODED_LEN,
8693                __tmp.remaining(),
8694            )
8695        }
8696        __tmp.put_u8(self.target_system);
8697        __tmp.put_u8(self.control_request);
8698        __tmp.put_u8(self.version);
8699        for val in &self.passkey {
8700            __tmp.put_u8(*val);
8701        }
8702        if matches!(version, MavlinkVersion::V2) {
8703            let len = __tmp.len();
8704            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8705        } else {
8706            __tmp.len()
8707        }
8708    }
8709}
8710#[doc = "Accept / deny control of this MAV."]
8711#[doc = ""]
8712#[doc = "ID: 6"]
8713#[derive(Debug, Clone, PartialEq)]
8714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8716#[cfg_attr(feature = "ts", derive(TS))]
8717#[cfg_attr(feature = "ts", ts(export))]
8718pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8719    #[doc = "ID of the GCS this message"]
8720    pub gcs_system_id: u8,
8721    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8722    pub control_request: u8,
8723    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8724    pub ack: u8,
8725}
8726impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8727    pub const ENCODED_LEN: usize = 3usize;
8728    pub const DEFAULT: Self = Self {
8729        gcs_system_id: 0_u8,
8730        control_request: 0_u8,
8731        ack: 0_u8,
8732    };
8733    #[cfg(feature = "arbitrary")]
8734    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8735        use arbitrary::{Arbitrary, Unstructured};
8736        let mut buf = [0u8; 1024];
8737        rng.fill_bytes(&mut buf);
8738        let mut unstructured = Unstructured::new(&buf);
8739        Self::arbitrary(&mut unstructured).unwrap_or_default()
8740    }
8741}
8742impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8743    fn default() -> Self {
8744        Self::DEFAULT.clone()
8745    }
8746}
8747impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8748    type Message = MavMessage;
8749    const ID: u32 = 6u32;
8750    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8751    const EXTRA_CRC: u8 = 104u8;
8752    const ENCODED_LEN: usize = 3usize;
8753    fn deser(
8754        _version: MavlinkVersion,
8755        __input: &[u8],
8756    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8757        let avail_len = __input.len();
8758        let mut payload_buf = [0; Self::ENCODED_LEN];
8759        let mut buf = if avail_len < Self::ENCODED_LEN {
8760            payload_buf[0..avail_len].copy_from_slice(__input);
8761            Bytes::new(&payload_buf)
8762        } else {
8763            Bytes::new(__input)
8764        };
8765        let mut __struct = Self::default();
8766        __struct.gcs_system_id = buf.get_u8()?;
8767        __struct.control_request = buf.get_u8()?;
8768        __struct.ack = buf.get_u8()?;
8769        Ok(__struct)
8770    }
8771    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8772        let mut __tmp = BytesMut::new(bytes);
8773        #[allow(clippy::absurd_extreme_comparisons)]
8774        #[allow(unused_comparisons)]
8775        if __tmp.remaining() < Self::ENCODED_LEN {
8776            panic!(
8777                "buffer is too small (need {} bytes, but got {})",
8778                Self::ENCODED_LEN,
8779                __tmp.remaining(),
8780            )
8781        }
8782        __tmp.put_u8(self.gcs_system_id);
8783        __tmp.put_u8(self.control_request);
8784        __tmp.put_u8(self.ack);
8785        if matches!(version, MavlinkVersion::V2) {
8786            let len = __tmp.len();
8787            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8788        } else {
8789            __tmp.len()
8790        }
8791    }
8792}
8793#[doc = "Information about a potential collision."]
8794#[doc = ""]
8795#[doc = "ID: 247"]
8796#[derive(Debug, Clone, PartialEq)]
8797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8799#[cfg_attr(feature = "ts", derive(TS))]
8800#[cfg_attr(feature = "ts", ts(export))]
8801pub struct COLLISION_DATA {
8802    #[doc = "Unique identifier, domain based on src field"]
8803    pub id: u32,
8804    #[doc = "Estimated time until collision occurs"]
8805    pub time_to_minimum_delta: f32,
8806    #[doc = "Closest vertical distance between vehicle and object"]
8807    pub altitude_minimum_delta: f32,
8808    #[doc = "Closest horizontal distance between vehicle and object"]
8809    pub horizontal_minimum_delta: f32,
8810    #[doc = "Collision data source"]
8811    pub src: MavCollisionSrc,
8812    #[doc = "Action that is being taken to avoid this collision"]
8813    pub action: MavCollisionAction,
8814    #[doc = "How concerned the aircraft is about this collision"]
8815    pub threat_level: MavCollisionThreatLevel,
8816}
8817impl COLLISION_DATA {
8818    pub const ENCODED_LEN: usize = 19usize;
8819    pub const DEFAULT: Self = Self {
8820        id: 0_u32,
8821        time_to_minimum_delta: 0.0_f32,
8822        altitude_minimum_delta: 0.0_f32,
8823        horizontal_minimum_delta: 0.0_f32,
8824        src: MavCollisionSrc::DEFAULT,
8825        action: MavCollisionAction::DEFAULT,
8826        threat_level: MavCollisionThreatLevel::DEFAULT,
8827    };
8828    #[cfg(feature = "arbitrary")]
8829    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8830        use arbitrary::{Arbitrary, Unstructured};
8831        let mut buf = [0u8; 1024];
8832        rng.fill_bytes(&mut buf);
8833        let mut unstructured = Unstructured::new(&buf);
8834        Self::arbitrary(&mut unstructured).unwrap_or_default()
8835    }
8836}
8837impl Default for COLLISION_DATA {
8838    fn default() -> Self {
8839        Self::DEFAULT.clone()
8840    }
8841}
8842impl MessageData for COLLISION_DATA {
8843    type Message = MavMessage;
8844    const ID: u32 = 247u32;
8845    const NAME: &'static str = "COLLISION";
8846    const EXTRA_CRC: u8 = 81u8;
8847    const ENCODED_LEN: usize = 19usize;
8848    fn deser(
8849        _version: MavlinkVersion,
8850        __input: &[u8],
8851    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8852        let avail_len = __input.len();
8853        let mut payload_buf = [0; Self::ENCODED_LEN];
8854        let mut buf = if avail_len < Self::ENCODED_LEN {
8855            payload_buf[0..avail_len].copy_from_slice(__input);
8856            Bytes::new(&payload_buf)
8857        } else {
8858            Bytes::new(__input)
8859        };
8860        let mut __struct = Self::default();
8861        __struct.id = buf.get_u32_le()?;
8862        __struct.time_to_minimum_delta = buf.get_f32_le()?;
8863        __struct.altitude_minimum_delta = buf.get_f32_le()?;
8864        __struct.horizontal_minimum_delta = buf.get_f32_le()?;
8865        let tmp = buf.get_u8()?;
8866        __struct.src =
8867            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8868                enum_type: "MavCollisionSrc",
8869                value: tmp as u64,
8870            })?;
8871        let tmp = buf.get_u8()?;
8872        __struct.action =
8873            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8874                enum_type: "MavCollisionAction",
8875                value: tmp as u64,
8876            })?;
8877        let tmp = buf.get_u8()?;
8878        __struct.threat_level =
8879            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8880                enum_type: "MavCollisionThreatLevel",
8881                value: tmp as u64,
8882            })?;
8883        Ok(__struct)
8884    }
8885    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8886        let mut __tmp = BytesMut::new(bytes);
8887        #[allow(clippy::absurd_extreme_comparisons)]
8888        #[allow(unused_comparisons)]
8889        if __tmp.remaining() < Self::ENCODED_LEN {
8890            panic!(
8891                "buffer is too small (need {} bytes, but got {})",
8892                Self::ENCODED_LEN,
8893                __tmp.remaining(),
8894            )
8895        }
8896        __tmp.put_u32_le(self.id);
8897        __tmp.put_f32_le(self.time_to_minimum_delta);
8898        __tmp.put_f32_le(self.altitude_minimum_delta);
8899        __tmp.put_f32_le(self.horizontal_minimum_delta);
8900        __tmp.put_u8(self.src as u8);
8901        __tmp.put_u8(self.action as u8);
8902        __tmp.put_u8(self.threat_level as u8);
8903        if matches!(version, MavlinkVersion::V2) {
8904            let len = __tmp.len();
8905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8906        } else {
8907            __tmp.len()
8908        }
8909    }
8910}
8911#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8912#[doc = ""]
8913#[doc = "ID: 77"]
8914#[derive(Debug, Clone, PartialEq)]
8915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8916#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8917#[cfg_attr(feature = "ts", derive(TS))]
8918#[cfg_attr(feature = "ts", ts(export))]
8919pub struct COMMAND_ACK_DATA {
8920    #[doc = "Command ID (of acknowledged command)."]
8921    pub command: MavCmd,
8922    #[doc = "Result of command."]
8923    pub result: MavResult,
8924    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8925    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8926    pub progress: u8,
8927    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8928    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8929    pub result_param2: i32,
8930    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8931    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8932    pub target_system: u8,
8933    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8934    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8935    pub target_component: u8,
8936}
8937impl COMMAND_ACK_DATA {
8938    pub const ENCODED_LEN: usize = 10usize;
8939    pub const DEFAULT: Self = Self {
8940        command: MavCmd::DEFAULT,
8941        result: MavResult::DEFAULT,
8942        progress: 0_u8,
8943        result_param2: 0_i32,
8944        target_system: 0_u8,
8945        target_component: 0_u8,
8946    };
8947    #[cfg(feature = "arbitrary")]
8948    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8949        use arbitrary::{Arbitrary, Unstructured};
8950        let mut buf = [0u8; 1024];
8951        rng.fill_bytes(&mut buf);
8952        let mut unstructured = Unstructured::new(&buf);
8953        Self::arbitrary(&mut unstructured).unwrap_or_default()
8954    }
8955}
8956impl Default for COMMAND_ACK_DATA {
8957    fn default() -> Self {
8958        Self::DEFAULT.clone()
8959    }
8960}
8961impl MessageData for COMMAND_ACK_DATA {
8962    type Message = MavMessage;
8963    const ID: u32 = 77u32;
8964    const NAME: &'static str = "COMMAND_ACK";
8965    const EXTRA_CRC: u8 = 143u8;
8966    const ENCODED_LEN: usize = 10usize;
8967    fn deser(
8968        _version: MavlinkVersion,
8969        __input: &[u8],
8970    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8971        let avail_len = __input.len();
8972        let mut payload_buf = [0; Self::ENCODED_LEN];
8973        let mut buf = if avail_len < Self::ENCODED_LEN {
8974            payload_buf[0..avail_len].copy_from_slice(__input);
8975            Bytes::new(&payload_buf)
8976        } else {
8977            Bytes::new(__input)
8978        };
8979        let mut __struct = Self::default();
8980        let tmp = buf.get_u16_le()?;
8981        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8982            ::mavlink_core::error::ParserError::InvalidEnum {
8983                enum_type: "MavCmd",
8984                value: tmp as u64,
8985            },
8986        )?;
8987        let tmp = buf.get_u8()?;
8988        __struct.result =
8989            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8990                enum_type: "MavResult",
8991                value: tmp as u64,
8992            })?;
8993        __struct.progress = buf.get_u8()?;
8994        __struct.result_param2 = buf.get_i32_le()?;
8995        __struct.target_system = buf.get_u8()?;
8996        __struct.target_component = buf.get_u8()?;
8997        Ok(__struct)
8998    }
8999    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9000        let mut __tmp = BytesMut::new(bytes);
9001        #[allow(clippy::absurd_extreme_comparisons)]
9002        #[allow(unused_comparisons)]
9003        if __tmp.remaining() < Self::ENCODED_LEN {
9004            panic!(
9005                "buffer is too small (need {} bytes, but got {})",
9006                Self::ENCODED_LEN,
9007                __tmp.remaining(),
9008            )
9009        }
9010        __tmp.put_u16_le(self.command as u16);
9011        __tmp.put_u8(self.result as u8);
9012        if matches!(version, MavlinkVersion::V2) {
9013            __tmp.put_u8(self.progress);
9014            __tmp.put_i32_le(self.result_param2);
9015            __tmp.put_u8(self.target_system);
9016            __tmp.put_u8(self.target_component);
9017            let len = __tmp.len();
9018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9019        } else {
9020            __tmp.len()
9021        }
9022    }
9023}
9024#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9025#[doc = ""]
9026#[doc = "ID: 80"]
9027#[derive(Debug, Clone, PartialEq)]
9028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9030#[cfg_attr(feature = "ts", derive(TS))]
9031#[cfg_attr(feature = "ts", ts(export))]
9032pub struct COMMAND_CANCEL_DATA {
9033    #[doc = "Command ID (of command to cancel)."]
9034    pub command: MavCmd,
9035    #[doc = "System executing long running command. Should not be broadcast (0)."]
9036    pub target_system: u8,
9037    #[doc = "Component executing long running command."]
9038    pub target_component: u8,
9039}
9040impl COMMAND_CANCEL_DATA {
9041    pub const ENCODED_LEN: usize = 4usize;
9042    pub const DEFAULT: Self = Self {
9043        command: MavCmd::DEFAULT,
9044        target_system: 0_u8,
9045        target_component: 0_u8,
9046    };
9047    #[cfg(feature = "arbitrary")]
9048    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9049        use arbitrary::{Arbitrary, Unstructured};
9050        let mut buf = [0u8; 1024];
9051        rng.fill_bytes(&mut buf);
9052        let mut unstructured = Unstructured::new(&buf);
9053        Self::arbitrary(&mut unstructured).unwrap_or_default()
9054    }
9055}
9056impl Default for COMMAND_CANCEL_DATA {
9057    fn default() -> Self {
9058        Self::DEFAULT.clone()
9059    }
9060}
9061impl MessageData for COMMAND_CANCEL_DATA {
9062    type Message = MavMessage;
9063    const ID: u32 = 80u32;
9064    const NAME: &'static str = "COMMAND_CANCEL";
9065    const EXTRA_CRC: u8 = 14u8;
9066    const ENCODED_LEN: usize = 4usize;
9067    fn deser(
9068        _version: MavlinkVersion,
9069        __input: &[u8],
9070    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9071        let avail_len = __input.len();
9072        let mut payload_buf = [0; Self::ENCODED_LEN];
9073        let mut buf = if avail_len < Self::ENCODED_LEN {
9074            payload_buf[0..avail_len].copy_from_slice(__input);
9075            Bytes::new(&payload_buf)
9076        } else {
9077            Bytes::new(__input)
9078        };
9079        let mut __struct = Self::default();
9080        let tmp = buf.get_u16_le()?;
9081        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9082            ::mavlink_core::error::ParserError::InvalidEnum {
9083                enum_type: "MavCmd",
9084                value: tmp as u64,
9085            },
9086        )?;
9087        __struct.target_system = buf.get_u8()?;
9088        __struct.target_component = buf.get_u8()?;
9089        Ok(__struct)
9090    }
9091    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9092        let mut __tmp = BytesMut::new(bytes);
9093        #[allow(clippy::absurd_extreme_comparisons)]
9094        #[allow(unused_comparisons)]
9095        if __tmp.remaining() < Self::ENCODED_LEN {
9096            panic!(
9097                "buffer is too small (need {} bytes, but got {})",
9098                Self::ENCODED_LEN,
9099                __tmp.remaining(),
9100            )
9101        }
9102        __tmp.put_u16_le(self.command as u16);
9103        __tmp.put_u8(self.target_system);
9104        __tmp.put_u8(self.target_component);
9105        if matches!(version, MavlinkVersion::V2) {
9106            let len = __tmp.len();
9107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9108        } else {
9109            __tmp.len()
9110        }
9111    }
9112}
9113#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9114#[doc = ""]
9115#[doc = "ID: 75"]
9116#[derive(Debug, Clone, PartialEq)]
9117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9119#[cfg_attr(feature = "ts", derive(TS))]
9120#[cfg_attr(feature = "ts", ts(export))]
9121pub struct COMMAND_INT_DATA {
9122    #[doc = "PARAM1, see MAV_CMD enum"]
9123    pub param1: f32,
9124    #[doc = "PARAM2, see MAV_CMD enum"]
9125    pub param2: f32,
9126    #[doc = "PARAM3, see MAV_CMD enum"]
9127    pub param3: f32,
9128    #[doc = "PARAM4, see MAV_CMD enum"]
9129    pub param4: f32,
9130    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9131    pub x: i32,
9132    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9133    pub y: i32,
9134    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9135    pub z: f32,
9136    #[doc = "The scheduled action for the mission item."]
9137    pub command: MavCmd,
9138    #[doc = "System ID"]
9139    pub target_system: u8,
9140    #[doc = "Component ID"]
9141    pub target_component: u8,
9142    #[doc = "The coordinate system of the COMMAND."]
9143    pub frame: MavFrame,
9144    #[doc = "Not used."]
9145    pub current: u8,
9146    #[doc = "Not used (set 0)."]
9147    pub autocontinue: u8,
9148}
9149impl COMMAND_INT_DATA {
9150    pub const ENCODED_LEN: usize = 35usize;
9151    pub const DEFAULT: Self = Self {
9152        param1: 0.0_f32,
9153        param2: 0.0_f32,
9154        param3: 0.0_f32,
9155        param4: 0.0_f32,
9156        x: 0_i32,
9157        y: 0_i32,
9158        z: 0.0_f32,
9159        command: MavCmd::DEFAULT,
9160        target_system: 0_u8,
9161        target_component: 0_u8,
9162        frame: MavFrame::DEFAULT,
9163        current: 0_u8,
9164        autocontinue: 0_u8,
9165    };
9166    #[cfg(feature = "arbitrary")]
9167    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9168        use arbitrary::{Arbitrary, Unstructured};
9169        let mut buf = [0u8; 1024];
9170        rng.fill_bytes(&mut buf);
9171        let mut unstructured = Unstructured::new(&buf);
9172        Self::arbitrary(&mut unstructured).unwrap_or_default()
9173    }
9174}
9175impl Default for COMMAND_INT_DATA {
9176    fn default() -> Self {
9177        Self::DEFAULT.clone()
9178    }
9179}
9180impl MessageData for COMMAND_INT_DATA {
9181    type Message = MavMessage;
9182    const ID: u32 = 75u32;
9183    const NAME: &'static str = "COMMAND_INT";
9184    const EXTRA_CRC: u8 = 158u8;
9185    const ENCODED_LEN: usize = 35usize;
9186    fn deser(
9187        _version: MavlinkVersion,
9188        __input: &[u8],
9189    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9190        let avail_len = __input.len();
9191        let mut payload_buf = [0; Self::ENCODED_LEN];
9192        let mut buf = if avail_len < Self::ENCODED_LEN {
9193            payload_buf[0..avail_len].copy_from_slice(__input);
9194            Bytes::new(&payload_buf)
9195        } else {
9196            Bytes::new(__input)
9197        };
9198        let mut __struct = Self::default();
9199        __struct.param1 = buf.get_f32_le()?;
9200        __struct.param2 = buf.get_f32_le()?;
9201        __struct.param3 = buf.get_f32_le()?;
9202        __struct.param4 = buf.get_f32_le()?;
9203        __struct.x = buf.get_i32_le()?;
9204        __struct.y = buf.get_i32_le()?;
9205        __struct.z = buf.get_f32_le()?;
9206        let tmp = buf.get_u16_le()?;
9207        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9208            ::mavlink_core::error::ParserError::InvalidEnum {
9209                enum_type: "MavCmd",
9210                value: tmp as u64,
9211            },
9212        )?;
9213        __struct.target_system = buf.get_u8()?;
9214        __struct.target_component = buf.get_u8()?;
9215        let tmp = buf.get_u8()?;
9216        __struct.frame =
9217            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9218                enum_type: "MavFrame",
9219                value: tmp as u64,
9220            })?;
9221        __struct.current = buf.get_u8()?;
9222        __struct.autocontinue = buf.get_u8()?;
9223        Ok(__struct)
9224    }
9225    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9226        let mut __tmp = BytesMut::new(bytes);
9227        #[allow(clippy::absurd_extreme_comparisons)]
9228        #[allow(unused_comparisons)]
9229        if __tmp.remaining() < Self::ENCODED_LEN {
9230            panic!(
9231                "buffer is too small (need {} bytes, but got {})",
9232                Self::ENCODED_LEN,
9233                __tmp.remaining(),
9234            )
9235        }
9236        __tmp.put_f32_le(self.param1);
9237        __tmp.put_f32_le(self.param2);
9238        __tmp.put_f32_le(self.param3);
9239        __tmp.put_f32_le(self.param4);
9240        __tmp.put_i32_le(self.x);
9241        __tmp.put_i32_le(self.y);
9242        __tmp.put_f32_le(self.z);
9243        __tmp.put_u16_le(self.command as u16);
9244        __tmp.put_u8(self.target_system);
9245        __tmp.put_u8(self.target_component);
9246        __tmp.put_u8(self.frame as u8);
9247        __tmp.put_u8(self.current);
9248        __tmp.put_u8(self.autocontinue);
9249        if matches!(version, MavlinkVersion::V2) {
9250            let len = __tmp.len();
9251            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9252        } else {
9253            __tmp.len()
9254        }
9255    }
9256}
9257#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9258#[doc = ""]
9259#[doc = "ID: 76"]
9260#[derive(Debug, Clone, PartialEq)]
9261#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9262#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9263#[cfg_attr(feature = "ts", derive(TS))]
9264#[cfg_attr(feature = "ts", ts(export))]
9265pub struct COMMAND_LONG_DATA {
9266    #[doc = "Parameter 1 (for the specific command)."]
9267    pub param1: f32,
9268    #[doc = "Parameter 2 (for the specific command)."]
9269    pub param2: f32,
9270    #[doc = "Parameter 3 (for the specific command)."]
9271    pub param3: f32,
9272    #[doc = "Parameter 4 (for the specific command)."]
9273    pub param4: f32,
9274    #[doc = "Parameter 5 (for the specific command)."]
9275    pub param5: f32,
9276    #[doc = "Parameter 6 (for the specific command)."]
9277    pub param6: f32,
9278    #[doc = "Parameter 7 (for the specific command)."]
9279    pub param7: f32,
9280    #[doc = "Command ID (of command to send)."]
9281    pub command: MavCmd,
9282    #[doc = "System which should execute the command"]
9283    pub target_system: u8,
9284    #[doc = "Component which should execute the command, 0 for all components"]
9285    pub target_component: u8,
9286    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9287    pub confirmation: u8,
9288}
9289impl COMMAND_LONG_DATA {
9290    pub const ENCODED_LEN: usize = 33usize;
9291    pub const DEFAULT: Self = Self {
9292        param1: 0.0_f32,
9293        param2: 0.0_f32,
9294        param3: 0.0_f32,
9295        param4: 0.0_f32,
9296        param5: 0.0_f32,
9297        param6: 0.0_f32,
9298        param7: 0.0_f32,
9299        command: MavCmd::DEFAULT,
9300        target_system: 0_u8,
9301        target_component: 0_u8,
9302        confirmation: 0_u8,
9303    };
9304    #[cfg(feature = "arbitrary")]
9305    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9306        use arbitrary::{Arbitrary, Unstructured};
9307        let mut buf = [0u8; 1024];
9308        rng.fill_bytes(&mut buf);
9309        let mut unstructured = Unstructured::new(&buf);
9310        Self::arbitrary(&mut unstructured).unwrap_or_default()
9311    }
9312}
9313impl Default for COMMAND_LONG_DATA {
9314    fn default() -> Self {
9315        Self::DEFAULT.clone()
9316    }
9317}
9318impl MessageData for COMMAND_LONG_DATA {
9319    type Message = MavMessage;
9320    const ID: u32 = 76u32;
9321    const NAME: &'static str = "COMMAND_LONG";
9322    const EXTRA_CRC: u8 = 152u8;
9323    const ENCODED_LEN: usize = 33usize;
9324    fn deser(
9325        _version: MavlinkVersion,
9326        __input: &[u8],
9327    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9328        let avail_len = __input.len();
9329        let mut payload_buf = [0; Self::ENCODED_LEN];
9330        let mut buf = if avail_len < Self::ENCODED_LEN {
9331            payload_buf[0..avail_len].copy_from_slice(__input);
9332            Bytes::new(&payload_buf)
9333        } else {
9334            Bytes::new(__input)
9335        };
9336        let mut __struct = Self::default();
9337        __struct.param1 = buf.get_f32_le()?;
9338        __struct.param2 = buf.get_f32_le()?;
9339        __struct.param3 = buf.get_f32_le()?;
9340        __struct.param4 = buf.get_f32_le()?;
9341        __struct.param5 = buf.get_f32_le()?;
9342        __struct.param6 = buf.get_f32_le()?;
9343        __struct.param7 = buf.get_f32_le()?;
9344        let tmp = buf.get_u16_le()?;
9345        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9346            ::mavlink_core::error::ParserError::InvalidEnum {
9347                enum_type: "MavCmd",
9348                value: tmp as u64,
9349            },
9350        )?;
9351        __struct.target_system = buf.get_u8()?;
9352        __struct.target_component = buf.get_u8()?;
9353        __struct.confirmation = buf.get_u8()?;
9354        Ok(__struct)
9355    }
9356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9357        let mut __tmp = BytesMut::new(bytes);
9358        #[allow(clippy::absurd_extreme_comparisons)]
9359        #[allow(unused_comparisons)]
9360        if __tmp.remaining() < Self::ENCODED_LEN {
9361            panic!(
9362                "buffer is too small (need {} bytes, but got {})",
9363                Self::ENCODED_LEN,
9364                __tmp.remaining(),
9365            )
9366        }
9367        __tmp.put_f32_le(self.param1);
9368        __tmp.put_f32_le(self.param2);
9369        __tmp.put_f32_le(self.param3);
9370        __tmp.put_f32_le(self.param4);
9371        __tmp.put_f32_le(self.param5);
9372        __tmp.put_f32_le(self.param6);
9373        __tmp.put_f32_le(self.param7);
9374        __tmp.put_u16_le(self.command as u16);
9375        __tmp.put_u8(self.target_system);
9376        __tmp.put_u8(self.target_component);
9377        __tmp.put_u8(self.confirmation);
9378        if matches!(version, MavlinkVersion::V2) {
9379            let len = __tmp.len();
9380            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9381        } else {
9382            __tmp.len()
9383        }
9384    }
9385}
9386#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9387#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9388#[doc = ""]
9389#[doc = "ID: 395"]
9390#[derive(Debug, Clone, PartialEq)]
9391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9393#[cfg_attr(feature = "ts", derive(TS))]
9394#[cfg_attr(feature = "ts", ts(export))]
9395pub struct COMPONENT_INFORMATION_DATA {
9396    #[doc = "Timestamp (time since system boot)."]
9397    pub time_boot_ms: u32,
9398    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9399    pub general_metadata_file_crc: u32,
9400    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9401    pub peripherals_metadata_file_crc: u32,
9402    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9403    #[cfg_attr(feature = "ts", ts(type = "string"))]
9404    pub general_metadata_uri: CharArray<100>,
9405    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9406    #[cfg_attr(feature = "ts", ts(type = "string"))]
9407    pub peripherals_metadata_uri: CharArray<100>,
9408}
9409impl COMPONENT_INFORMATION_DATA {
9410    pub const ENCODED_LEN: usize = 212usize;
9411    pub const DEFAULT: Self = Self {
9412        time_boot_ms: 0_u32,
9413        general_metadata_file_crc: 0_u32,
9414        peripherals_metadata_file_crc: 0_u32,
9415        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9416        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9417    };
9418    #[cfg(feature = "arbitrary")]
9419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9420        use arbitrary::{Arbitrary, Unstructured};
9421        let mut buf = [0u8; 1024];
9422        rng.fill_bytes(&mut buf);
9423        let mut unstructured = Unstructured::new(&buf);
9424        Self::arbitrary(&mut unstructured).unwrap_or_default()
9425    }
9426}
9427impl Default for COMPONENT_INFORMATION_DATA {
9428    fn default() -> Self {
9429        Self::DEFAULT.clone()
9430    }
9431}
9432impl MessageData for COMPONENT_INFORMATION_DATA {
9433    type Message = MavMessage;
9434    const ID: u32 = 395u32;
9435    const NAME: &'static str = "COMPONENT_INFORMATION";
9436    const EXTRA_CRC: u8 = 0u8;
9437    const ENCODED_LEN: usize = 212usize;
9438    fn deser(
9439        _version: MavlinkVersion,
9440        __input: &[u8],
9441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9442        let avail_len = __input.len();
9443        let mut payload_buf = [0; Self::ENCODED_LEN];
9444        let mut buf = if avail_len < Self::ENCODED_LEN {
9445            payload_buf[0..avail_len].copy_from_slice(__input);
9446            Bytes::new(&payload_buf)
9447        } else {
9448            Bytes::new(__input)
9449        };
9450        let mut __struct = Self::default();
9451        __struct.time_boot_ms = buf.get_u32_le()?;
9452        __struct.general_metadata_file_crc = buf.get_u32_le()?;
9453        __struct.peripherals_metadata_file_crc = buf.get_u32_le()?;
9454        let mut tmp = [0_u8; 100usize];
9455        for v in &mut tmp {
9456            *v = buf.get_u8()?;
9457        }
9458        __struct.general_metadata_uri = CharArray::new(tmp);
9459        let mut tmp = [0_u8; 100usize];
9460        for v in &mut tmp {
9461            *v = buf.get_u8()?;
9462        }
9463        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9464        Ok(__struct)
9465    }
9466    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9467        let mut __tmp = BytesMut::new(bytes);
9468        #[allow(clippy::absurd_extreme_comparisons)]
9469        #[allow(unused_comparisons)]
9470        if __tmp.remaining() < Self::ENCODED_LEN {
9471            panic!(
9472                "buffer is too small (need {} bytes, but got {})",
9473                Self::ENCODED_LEN,
9474                __tmp.remaining(),
9475            )
9476        }
9477        __tmp.put_u32_le(self.time_boot_ms);
9478        __tmp.put_u32_le(self.general_metadata_file_crc);
9479        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9480        for val in &self.general_metadata_uri {
9481            __tmp.put_u8(*val);
9482        }
9483        for val in &self.peripherals_metadata_uri {
9484            __tmp.put_u8(*val);
9485        }
9486        if matches!(version, MavlinkVersion::V2) {
9487            let len = __tmp.len();
9488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9489        } else {
9490            __tmp.len()
9491        }
9492    }
9493}
9494#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9495#[doc = ""]
9496#[doc = "ID: 396"]
9497#[derive(Debug, Clone, PartialEq)]
9498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9500#[cfg_attr(feature = "ts", derive(TS))]
9501#[cfg_attr(feature = "ts", ts(export))]
9502pub struct COMPONENT_INFORMATION_BASIC_DATA {
9503    #[doc = "Component capability flags"]
9504    pub capabilities: MavProtocolCapability,
9505    #[doc = "Timestamp (time since system boot)."]
9506    pub time_boot_ms: u32,
9507    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9508    pub time_manufacture_s: u32,
9509    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9510    #[cfg_attr(feature = "ts", ts(type = "string"))]
9511    pub vendor_name: CharArray<32>,
9512    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9513    #[cfg_attr(feature = "ts", ts(type = "string"))]
9514    pub model_name: CharArray<32>,
9515    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9516    #[cfg_attr(feature = "ts", ts(type = "string"))]
9517    pub software_version: CharArray<24>,
9518    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9519    #[cfg_attr(feature = "ts", ts(type = "string"))]
9520    pub hardware_version: CharArray<24>,
9521    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9522    #[cfg_attr(feature = "ts", ts(type = "string"))]
9523    pub serial_number: CharArray<32>,
9524}
9525impl COMPONENT_INFORMATION_BASIC_DATA {
9526    pub const ENCODED_LEN: usize = 160usize;
9527    pub const DEFAULT: Self = Self {
9528        capabilities: MavProtocolCapability::DEFAULT,
9529        time_boot_ms: 0_u32,
9530        time_manufacture_s: 0_u32,
9531        vendor_name: CharArray::new([0_u8; 32usize]),
9532        model_name: CharArray::new([0_u8; 32usize]),
9533        software_version: CharArray::new([0_u8; 24usize]),
9534        hardware_version: CharArray::new([0_u8; 24usize]),
9535        serial_number: CharArray::new([0_u8; 32usize]),
9536    };
9537    #[cfg(feature = "arbitrary")]
9538    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9539        use arbitrary::{Arbitrary, Unstructured};
9540        let mut buf = [0u8; 1024];
9541        rng.fill_bytes(&mut buf);
9542        let mut unstructured = Unstructured::new(&buf);
9543        Self::arbitrary(&mut unstructured).unwrap_or_default()
9544    }
9545}
9546impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9547    fn default() -> Self {
9548        Self::DEFAULT.clone()
9549    }
9550}
9551impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9552    type Message = MavMessage;
9553    const ID: u32 = 396u32;
9554    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9555    const EXTRA_CRC: u8 = 50u8;
9556    const ENCODED_LEN: usize = 160usize;
9557    fn deser(
9558        _version: MavlinkVersion,
9559        __input: &[u8],
9560    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9561        let avail_len = __input.len();
9562        let mut payload_buf = [0; Self::ENCODED_LEN];
9563        let mut buf = if avail_len < Self::ENCODED_LEN {
9564            payload_buf[0..avail_len].copy_from_slice(__input);
9565            Bytes::new(&payload_buf)
9566        } else {
9567            Bytes::new(__input)
9568        };
9569        let mut __struct = Self::default();
9570        let tmp = buf.get_u64_le()?;
9571        __struct.capabilities = MavProtocolCapability::from_bits(
9572            tmp as <MavProtocolCapability as Flags>::Bits,
9573        )
9574        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9575            flag_type: "MavProtocolCapability",
9576            value: tmp as u64,
9577        })?;
9578        __struct.time_boot_ms = buf.get_u32_le()?;
9579        __struct.time_manufacture_s = buf.get_u32_le()?;
9580        let mut tmp = [0_u8; 32usize];
9581        for v in &mut tmp {
9582            *v = buf.get_u8()?;
9583        }
9584        __struct.vendor_name = CharArray::new(tmp);
9585        let mut tmp = [0_u8; 32usize];
9586        for v in &mut tmp {
9587            *v = buf.get_u8()?;
9588        }
9589        __struct.model_name = CharArray::new(tmp);
9590        let mut tmp = [0_u8; 24usize];
9591        for v in &mut tmp {
9592            *v = buf.get_u8()?;
9593        }
9594        __struct.software_version = CharArray::new(tmp);
9595        let mut tmp = [0_u8; 24usize];
9596        for v in &mut tmp {
9597            *v = buf.get_u8()?;
9598        }
9599        __struct.hardware_version = CharArray::new(tmp);
9600        let mut tmp = [0_u8; 32usize];
9601        for v in &mut tmp {
9602            *v = buf.get_u8()?;
9603        }
9604        __struct.serial_number = CharArray::new(tmp);
9605        Ok(__struct)
9606    }
9607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9608        let mut __tmp = BytesMut::new(bytes);
9609        #[allow(clippy::absurd_extreme_comparisons)]
9610        #[allow(unused_comparisons)]
9611        if __tmp.remaining() < Self::ENCODED_LEN {
9612            panic!(
9613                "buffer is too small (need {} bytes, but got {})",
9614                Self::ENCODED_LEN,
9615                __tmp.remaining(),
9616            )
9617        }
9618        __tmp.put_u64_le(self.capabilities.bits() as u64);
9619        __tmp.put_u32_le(self.time_boot_ms);
9620        __tmp.put_u32_le(self.time_manufacture_s);
9621        for val in &self.vendor_name {
9622            __tmp.put_u8(*val);
9623        }
9624        for val in &self.model_name {
9625            __tmp.put_u8(*val);
9626        }
9627        for val in &self.software_version {
9628            __tmp.put_u8(*val);
9629        }
9630        for val in &self.hardware_version {
9631            __tmp.put_u8(*val);
9632        }
9633        for val in &self.serial_number {
9634            __tmp.put_u8(*val);
9635        }
9636        if matches!(version, MavlinkVersion::V2) {
9637            let len = __tmp.len();
9638            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9639        } else {
9640            __tmp.len()
9641        }
9642    }
9643}
9644#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9645#[doc = ""]
9646#[doc = "ID: 397"]
9647#[derive(Debug, Clone, PartialEq)]
9648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9649#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9650#[cfg_attr(feature = "ts", derive(TS))]
9651#[cfg_attr(feature = "ts", ts(export))]
9652pub struct COMPONENT_METADATA_DATA {
9653    #[doc = "Timestamp (time since system boot)."]
9654    pub time_boot_ms: u32,
9655    #[doc = "CRC32 of the general metadata file."]
9656    pub file_crc: u32,
9657    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9658    #[cfg_attr(feature = "ts", ts(type = "string"))]
9659    pub uri: CharArray<100>,
9660}
9661impl COMPONENT_METADATA_DATA {
9662    pub const ENCODED_LEN: usize = 108usize;
9663    pub const DEFAULT: Self = Self {
9664        time_boot_ms: 0_u32,
9665        file_crc: 0_u32,
9666        uri: CharArray::new([0_u8; 100usize]),
9667    };
9668    #[cfg(feature = "arbitrary")]
9669    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9670        use arbitrary::{Arbitrary, Unstructured};
9671        let mut buf = [0u8; 1024];
9672        rng.fill_bytes(&mut buf);
9673        let mut unstructured = Unstructured::new(&buf);
9674        Self::arbitrary(&mut unstructured).unwrap_or_default()
9675    }
9676}
9677impl Default for COMPONENT_METADATA_DATA {
9678    fn default() -> Self {
9679        Self::DEFAULT.clone()
9680    }
9681}
9682impl MessageData for COMPONENT_METADATA_DATA {
9683    type Message = MavMessage;
9684    const ID: u32 = 397u32;
9685    const NAME: &'static str = "COMPONENT_METADATA";
9686    const EXTRA_CRC: u8 = 182u8;
9687    const ENCODED_LEN: usize = 108usize;
9688    fn deser(
9689        _version: MavlinkVersion,
9690        __input: &[u8],
9691    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9692        let avail_len = __input.len();
9693        let mut payload_buf = [0; Self::ENCODED_LEN];
9694        let mut buf = if avail_len < Self::ENCODED_LEN {
9695            payload_buf[0..avail_len].copy_from_slice(__input);
9696            Bytes::new(&payload_buf)
9697        } else {
9698            Bytes::new(__input)
9699        };
9700        let mut __struct = Self::default();
9701        __struct.time_boot_ms = buf.get_u32_le()?;
9702        __struct.file_crc = buf.get_u32_le()?;
9703        let mut tmp = [0_u8; 100usize];
9704        for v in &mut tmp {
9705            *v = buf.get_u8()?;
9706        }
9707        __struct.uri = CharArray::new(tmp);
9708        Ok(__struct)
9709    }
9710    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9711        let mut __tmp = BytesMut::new(bytes);
9712        #[allow(clippy::absurd_extreme_comparisons)]
9713        #[allow(unused_comparisons)]
9714        if __tmp.remaining() < Self::ENCODED_LEN {
9715            panic!(
9716                "buffer is too small (need {} bytes, but got {})",
9717                Self::ENCODED_LEN,
9718                __tmp.remaining(),
9719            )
9720        }
9721        __tmp.put_u32_le(self.time_boot_ms);
9722        __tmp.put_u32_le(self.file_crc);
9723        for val in &self.uri {
9724            __tmp.put_u8(*val);
9725        }
9726        if matches!(version, MavlinkVersion::V2) {
9727            let len = __tmp.len();
9728            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9729        } else {
9730            __tmp.len()
9731        }
9732    }
9733}
9734#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9735#[doc = ""]
9736#[doc = "ID: 146"]
9737#[derive(Debug, Clone, PartialEq)]
9738#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9739#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9740#[cfg_attr(feature = "ts", derive(TS))]
9741#[cfg_attr(feature = "ts", ts(export))]
9742pub struct CONTROL_SYSTEM_STATE_DATA {
9743    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9744    pub time_usec: u64,
9745    #[doc = "X acceleration in body frame"]
9746    pub x_acc: f32,
9747    #[doc = "Y acceleration in body frame"]
9748    pub y_acc: f32,
9749    #[doc = "Z acceleration in body frame"]
9750    pub z_acc: f32,
9751    #[doc = "X velocity in body frame"]
9752    pub x_vel: f32,
9753    #[doc = "Y velocity in body frame"]
9754    pub y_vel: f32,
9755    #[doc = "Z velocity in body frame"]
9756    pub z_vel: f32,
9757    #[doc = "X position in local frame"]
9758    pub x_pos: f32,
9759    #[doc = "Y position in local frame"]
9760    pub y_pos: f32,
9761    #[doc = "Z position in local frame"]
9762    pub z_pos: f32,
9763    #[doc = "Airspeed, set to -1 if unknown"]
9764    pub airspeed: f32,
9765    #[doc = "Variance of body velocity estimate"]
9766    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9767    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9768    pub vel_variance: [f32; 3],
9769    #[doc = "Variance in local position"]
9770    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9771    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9772    pub pos_variance: [f32; 3],
9773    #[doc = "The attitude, represented as Quaternion"]
9774    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9775    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9776    pub q: [f32; 4],
9777    #[doc = "Angular rate in roll axis"]
9778    pub roll_rate: f32,
9779    #[doc = "Angular rate in pitch axis"]
9780    pub pitch_rate: f32,
9781    #[doc = "Angular rate in yaw axis"]
9782    pub yaw_rate: f32,
9783}
9784impl CONTROL_SYSTEM_STATE_DATA {
9785    pub const ENCODED_LEN: usize = 100usize;
9786    pub const DEFAULT: Self = Self {
9787        time_usec: 0_u64,
9788        x_acc: 0.0_f32,
9789        y_acc: 0.0_f32,
9790        z_acc: 0.0_f32,
9791        x_vel: 0.0_f32,
9792        y_vel: 0.0_f32,
9793        z_vel: 0.0_f32,
9794        x_pos: 0.0_f32,
9795        y_pos: 0.0_f32,
9796        z_pos: 0.0_f32,
9797        airspeed: 0.0_f32,
9798        vel_variance: [0.0_f32; 3usize],
9799        pos_variance: [0.0_f32; 3usize],
9800        q: [0.0_f32; 4usize],
9801        roll_rate: 0.0_f32,
9802        pitch_rate: 0.0_f32,
9803        yaw_rate: 0.0_f32,
9804    };
9805    #[cfg(feature = "arbitrary")]
9806    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9807        use arbitrary::{Arbitrary, Unstructured};
9808        let mut buf = [0u8; 1024];
9809        rng.fill_bytes(&mut buf);
9810        let mut unstructured = Unstructured::new(&buf);
9811        Self::arbitrary(&mut unstructured).unwrap_or_default()
9812    }
9813}
9814impl Default for CONTROL_SYSTEM_STATE_DATA {
9815    fn default() -> Self {
9816        Self::DEFAULT.clone()
9817    }
9818}
9819impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9820    type Message = MavMessage;
9821    const ID: u32 = 146u32;
9822    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9823    const EXTRA_CRC: u8 = 103u8;
9824    const ENCODED_LEN: usize = 100usize;
9825    fn deser(
9826        _version: MavlinkVersion,
9827        __input: &[u8],
9828    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9829        let avail_len = __input.len();
9830        let mut payload_buf = [0; Self::ENCODED_LEN];
9831        let mut buf = if avail_len < Self::ENCODED_LEN {
9832            payload_buf[0..avail_len].copy_from_slice(__input);
9833            Bytes::new(&payload_buf)
9834        } else {
9835            Bytes::new(__input)
9836        };
9837        let mut __struct = Self::default();
9838        __struct.time_usec = buf.get_u64_le()?;
9839        __struct.x_acc = buf.get_f32_le()?;
9840        __struct.y_acc = buf.get_f32_le()?;
9841        __struct.z_acc = buf.get_f32_le()?;
9842        __struct.x_vel = buf.get_f32_le()?;
9843        __struct.y_vel = buf.get_f32_le()?;
9844        __struct.z_vel = buf.get_f32_le()?;
9845        __struct.x_pos = buf.get_f32_le()?;
9846        __struct.y_pos = buf.get_f32_le()?;
9847        __struct.z_pos = buf.get_f32_le()?;
9848        __struct.airspeed = buf.get_f32_le()?;
9849        for v in &mut __struct.vel_variance {
9850            let val = buf.get_f32_le()?;
9851            *v = val;
9852        }
9853        for v in &mut __struct.pos_variance {
9854            let val = buf.get_f32_le()?;
9855            *v = val;
9856        }
9857        for v in &mut __struct.q {
9858            let val = buf.get_f32_le()?;
9859            *v = val;
9860        }
9861        __struct.roll_rate = buf.get_f32_le()?;
9862        __struct.pitch_rate = buf.get_f32_le()?;
9863        __struct.yaw_rate = buf.get_f32_le()?;
9864        Ok(__struct)
9865    }
9866    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9867        let mut __tmp = BytesMut::new(bytes);
9868        #[allow(clippy::absurd_extreme_comparisons)]
9869        #[allow(unused_comparisons)]
9870        if __tmp.remaining() < Self::ENCODED_LEN {
9871            panic!(
9872                "buffer is too small (need {} bytes, but got {})",
9873                Self::ENCODED_LEN,
9874                __tmp.remaining(),
9875            )
9876        }
9877        __tmp.put_u64_le(self.time_usec);
9878        __tmp.put_f32_le(self.x_acc);
9879        __tmp.put_f32_le(self.y_acc);
9880        __tmp.put_f32_le(self.z_acc);
9881        __tmp.put_f32_le(self.x_vel);
9882        __tmp.put_f32_le(self.y_vel);
9883        __tmp.put_f32_le(self.z_vel);
9884        __tmp.put_f32_le(self.x_pos);
9885        __tmp.put_f32_le(self.y_pos);
9886        __tmp.put_f32_le(self.z_pos);
9887        __tmp.put_f32_le(self.airspeed);
9888        for val in &self.vel_variance {
9889            __tmp.put_f32_le(*val);
9890        }
9891        for val in &self.pos_variance {
9892            __tmp.put_f32_le(*val);
9893        }
9894        for val in &self.q {
9895            __tmp.put_f32_le(*val);
9896        }
9897        __tmp.put_f32_le(self.roll_rate);
9898        __tmp.put_f32_le(self.pitch_rate);
9899        __tmp.put_f32_le(self.yaw_rate);
9900        if matches!(version, MavlinkVersion::V2) {
9901            let len = __tmp.len();
9902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9903        } else {
9904            __tmp.len()
9905        }
9906    }
9907}
9908#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9909#[doc = ""]
9910#[doc = "ID: 411"]
9911#[derive(Debug, Clone, PartialEq)]
9912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9914#[cfg_attr(feature = "ts", derive(TS))]
9915#[cfg_attr(feature = "ts", ts(export))]
9916pub struct CURRENT_EVENT_SEQUENCE_DATA {
9917    #[doc = "Sequence number."]
9918    pub sequence: u16,
9919    #[doc = "Flag bitset."]
9920    pub flags: MavEventCurrentSequenceFlags,
9921}
9922impl CURRENT_EVENT_SEQUENCE_DATA {
9923    pub const ENCODED_LEN: usize = 3usize;
9924    pub const DEFAULT: Self = Self {
9925        sequence: 0_u16,
9926        flags: MavEventCurrentSequenceFlags::DEFAULT,
9927    };
9928    #[cfg(feature = "arbitrary")]
9929    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9930        use arbitrary::{Arbitrary, Unstructured};
9931        let mut buf = [0u8; 1024];
9932        rng.fill_bytes(&mut buf);
9933        let mut unstructured = Unstructured::new(&buf);
9934        Self::arbitrary(&mut unstructured).unwrap_or_default()
9935    }
9936}
9937impl Default for CURRENT_EVENT_SEQUENCE_DATA {
9938    fn default() -> Self {
9939        Self::DEFAULT.clone()
9940    }
9941}
9942impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
9943    type Message = MavMessage;
9944    const ID: u32 = 411u32;
9945    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
9946    const EXTRA_CRC: u8 = 106u8;
9947    const ENCODED_LEN: usize = 3usize;
9948    fn deser(
9949        _version: MavlinkVersion,
9950        __input: &[u8],
9951    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9952        let avail_len = __input.len();
9953        let mut payload_buf = [0; Self::ENCODED_LEN];
9954        let mut buf = if avail_len < Self::ENCODED_LEN {
9955            payload_buf[0..avail_len].copy_from_slice(__input);
9956            Bytes::new(&payload_buf)
9957        } else {
9958            Bytes::new(__input)
9959        };
9960        let mut __struct = Self::default();
9961        __struct.sequence = buf.get_u16_le()?;
9962        let tmp = buf.get_u8()?;
9963        __struct.flags =
9964            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9965                enum_type: "MavEventCurrentSequenceFlags",
9966                value: tmp as u64,
9967            })?;
9968        Ok(__struct)
9969    }
9970    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9971        let mut __tmp = BytesMut::new(bytes);
9972        #[allow(clippy::absurd_extreme_comparisons)]
9973        #[allow(unused_comparisons)]
9974        if __tmp.remaining() < Self::ENCODED_LEN {
9975            panic!(
9976                "buffer is too small (need {} bytes, but got {})",
9977                Self::ENCODED_LEN,
9978                __tmp.remaining(),
9979            )
9980        }
9981        __tmp.put_u16_le(self.sequence);
9982        __tmp.put_u8(self.flags as u8);
9983        if matches!(version, MavlinkVersion::V2) {
9984            let len = __tmp.len();
9985            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9986        } else {
9987            __tmp.len()
9988        }
9989    }
9990}
9991#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
9992#[doc = ""]
9993#[doc = "ID: 436"]
9994#[derive(Debug, Clone, PartialEq)]
9995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9997#[cfg_attr(feature = "ts", derive(TS))]
9998#[cfg_attr(feature = "ts", ts(export))]
9999pub struct CURRENT_MODE_DATA {
10000    #[doc = "A bitfield for use for autopilot-specific flags"]
10001    pub custom_mode: u32,
10002    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10003    pub intended_custom_mode: u32,
10004    #[doc = "Standard mode."]
10005    pub standard_mode: MavStandardMode,
10006}
10007impl CURRENT_MODE_DATA {
10008    pub const ENCODED_LEN: usize = 9usize;
10009    pub const DEFAULT: Self = Self {
10010        custom_mode: 0_u32,
10011        intended_custom_mode: 0_u32,
10012        standard_mode: MavStandardMode::DEFAULT,
10013    };
10014    #[cfg(feature = "arbitrary")]
10015    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10016        use arbitrary::{Arbitrary, Unstructured};
10017        let mut buf = [0u8; 1024];
10018        rng.fill_bytes(&mut buf);
10019        let mut unstructured = Unstructured::new(&buf);
10020        Self::arbitrary(&mut unstructured).unwrap_or_default()
10021    }
10022}
10023impl Default for CURRENT_MODE_DATA {
10024    fn default() -> Self {
10025        Self::DEFAULT.clone()
10026    }
10027}
10028impl MessageData for CURRENT_MODE_DATA {
10029    type Message = MavMessage;
10030    const ID: u32 = 436u32;
10031    const NAME: &'static str = "CURRENT_MODE";
10032    const EXTRA_CRC: u8 = 193u8;
10033    const ENCODED_LEN: usize = 9usize;
10034    fn deser(
10035        _version: MavlinkVersion,
10036        __input: &[u8],
10037    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10038        let avail_len = __input.len();
10039        let mut payload_buf = [0; Self::ENCODED_LEN];
10040        let mut buf = if avail_len < Self::ENCODED_LEN {
10041            payload_buf[0..avail_len].copy_from_slice(__input);
10042            Bytes::new(&payload_buf)
10043        } else {
10044            Bytes::new(__input)
10045        };
10046        let mut __struct = Self::default();
10047        __struct.custom_mode = buf.get_u32_le()?;
10048        __struct.intended_custom_mode = buf.get_u32_le()?;
10049        let tmp = buf.get_u8()?;
10050        __struct.standard_mode =
10051            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10052                enum_type: "MavStandardMode",
10053                value: tmp as u64,
10054            })?;
10055        Ok(__struct)
10056    }
10057    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10058        let mut __tmp = BytesMut::new(bytes);
10059        #[allow(clippy::absurd_extreme_comparisons)]
10060        #[allow(unused_comparisons)]
10061        if __tmp.remaining() < Self::ENCODED_LEN {
10062            panic!(
10063                "buffer is too small (need {} bytes, but got {})",
10064                Self::ENCODED_LEN,
10065                __tmp.remaining(),
10066            )
10067        }
10068        __tmp.put_u32_le(self.custom_mode);
10069        __tmp.put_u32_le(self.intended_custom_mode);
10070        __tmp.put_u8(self.standard_mode as u8);
10071        if matches!(version, MavlinkVersion::V2) {
10072            let len = __tmp.len();
10073            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10074        } else {
10075            __tmp.len()
10076        }
10077    }
10078}
10079#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10080#[doc = "Data stream status information."]
10081#[doc = ""]
10082#[doc = "ID: 67"]
10083#[derive(Debug, Clone, PartialEq)]
10084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10085#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10086#[cfg_attr(feature = "ts", derive(TS))]
10087#[cfg_attr(feature = "ts", ts(export))]
10088pub struct DATA_STREAM_DATA {
10089    #[doc = "The message rate"]
10090    pub message_rate: u16,
10091    #[doc = "The ID of the requested data stream"]
10092    pub stream_id: u8,
10093    #[doc = "1 stream is enabled, 0 stream is stopped."]
10094    pub on_off: u8,
10095}
10096impl DATA_STREAM_DATA {
10097    pub const ENCODED_LEN: usize = 4usize;
10098    pub const DEFAULT: Self = Self {
10099        message_rate: 0_u16,
10100        stream_id: 0_u8,
10101        on_off: 0_u8,
10102    };
10103    #[cfg(feature = "arbitrary")]
10104    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10105        use arbitrary::{Arbitrary, Unstructured};
10106        let mut buf = [0u8; 1024];
10107        rng.fill_bytes(&mut buf);
10108        let mut unstructured = Unstructured::new(&buf);
10109        Self::arbitrary(&mut unstructured).unwrap_or_default()
10110    }
10111}
10112impl Default for DATA_STREAM_DATA {
10113    fn default() -> Self {
10114        Self::DEFAULT.clone()
10115    }
10116}
10117impl MessageData for DATA_STREAM_DATA {
10118    type Message = MavMessage;
10119    const ID: u32 = 67u32;
10120    const NAME: &'static str = "DATA_STREAM";
10121    const EXTRA_CRC: u8 = 21u8;
10122    const ENCODED_LEN: usize = 4usize;
10123    fn deser(
10124        _version: MavlinkVersion,
10125        __input: &[u8],
10126    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10127        let avail_len = __input.len();
10128        let mut payload_buf = [0; Self::ENCODED_LEN];
10129        let mut buf = if avail_len < Self::ENCODED_LEN {
10130            payload_buf[0..avail_len].copy_from_slice(__input);
10131            Bytes::new(&payload_buf)
10132        } else {
10133            Bytes::new(__input)
10134        };
10135        let mut __struct = Self::default();
10136        __struct.message_rate = buf.get_u16_le()?;
10137        __struct.stream_id = buf.get_u8()?;
10138        __struct.on_off = buf.get_u8()?;
10139        Ok(__struct)
10140    }
10141    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10142        let mut __tmp = BytesMut::new(bytes);
10143        #[allow(clippy::absurd_extreme_comparisons)]
10144        #[allow(unused_comparisons)]
10145        if __tmp.remaining() < Self::ENCODED_LEN {
10146            panic!(
10147                "buffer is too small (need {} bytes, but got {})",
10148                Self::ENCODED_LEN,
10149                __tmp.remaining(),
10150            )
10151        }
10152        __tmp.put_u16_le(self.message_rate);
10153        __tmp.put_u8(self.stream_id);
10154        __tmp.put_u8(self.on_off);
10155        if matches!(version, MavlinkVersion::V2) {
10156            let len = __tmp.len();
10157            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10158        } else {
10159            __tmp.len()
10160        }
10161    }
10162}
10163#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10164#[doc = ""]
10165#[doc = "ID: 130"]
10166#[derive(Debug, Clone, PartialEq)]
10167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10169#[cfg_attr(feature = "ts", derive(TS))]
10170#[cfg_attr(feature = "ts", ts(export))]
10171pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10172    #[doc = "total data size (set on ACK only)."]
10173    pub size: u32,
10174    #[doc = "Width of a matrix or image."]
10175    pub width: u16,
10176    #[doc = "Height of a matrix or image."]
10177    pub height: u16,
10178    #[doc = "Number of packets being sent (set on ACK only)."]
10179    pub packets: u16,
10180    #[doc = "Type of requested/acknowledged data."]
10181    pub mavtype: MavlinkDataStreamType,
10182    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10183    pub payload: u8,
10184    #[doc = "JPEG quality. Values: [1-100]."]
10185    pub jpg_quality: u8,
10186}
10187impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10188    pub const ENCODED_LEN: usize = 13usize;
10189    pub const DEFAULT: Self = Self {
10190        size: 0_u32,
10191        width: 0_u16,
10192        height: 0_u16,
10193        packets: 0_u16,
10194        mavtype: MavlinkDataStreamType::DEFAULT,
10195        payload: 0_u8,
10196        jpg_quality: 0_u8,
10197    };
10198    #[cfg(feature = "arbitrary")]
10199    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10200        use arbitrary::{Arbitrary, Unstructured};
10201        let mut buf = [0u8; 1024];
10202        rng.fill_bytes(&mut buf);
10203        let mut unstructured = Unstructured::new(&buf);
10204        Self::arbitrary(&mut unstructured).unwrap_or_default()
10205    }
10206}
10207impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10208    fn default() -> Self {
10209        Self::DEFAULT.clone()
10210    }
10211}
10212impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10213    type Message = MavMessage;
10214    const ID: u32 = 130u32;
10215    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10216    const EXTRA_CRC: u8 = 29u8;
10217    const ENCODED_LEN: usize = 13usize;
10218    fn deser(
10219        _version: MavlinkVersion,
10220        __input: &[u8],
10221    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10222        let avail_len = __input.len();
10223        let mut payload_buf = [0; Self::ENCODED_LEN];
10224        let mut buf = if avail_len < Self::ENCODED_LEN {
10225            payload_buf[0..avail_len].copy_from_slice(__input);
10226            Bytes::new(&payload_buf)
10227        } else {
10228            Bytes::new(__input)
10229        };
10230        let mut __struct = Self::default();
10231        __struct.size = buf.get_u32_le()?;
10232        __struct.width = buf.get_u16_le()?;
10233        __struct.height = buf.get_u16_le()?;
10234        __struct.packets = buf.get_u16_le()?;
10235        let tmp = buf.get_u8()?;
10236        __struct.mavtype =
10237            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10238                enum_type: "MavlinkDataStreamType",
10239                value: tmp as u64,
10240            })?;
10241        __struct.payload = buf.get_u8()?;
10242        __struct.jpg_quality = buf.get_u8()?;
10243        Ok(__struct)
10244    }
10245    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10246        let mut __tmp = BytesMut::new(bytes);
10247        #[allow(clippy::absurd_extreme_comparisons)]
10248        #[allow(unused_comparisons)]
10249        if __tmp.remaining() < Self::ENCODED_LEN {
10250            panic!(
10251                "buffer is too small (need {} bytes, but got {})",
10252                Self::ENCODED_LEN,
10253                __tmp.remaining(),
10254            )
10255        }
10256        __tmp.put_u32_le(self.size);
10257        __tmp.put_u16_le(self.width);
10258        __tmp.put_u16_le(self.height);
10259        __tmp.put_u16_le(self.packets);
10260        __tmp.put_u8(self.mavtype as u8);
10261        __tmp.put_u8(self.payload);
10262        __tmp.put_u8(self.jpg_quality);
10263        if matches!(version, MavlinkVersion::V2) {
10264            let len = __tmp.len();
10265            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10266        } else {
10267            __tmp.len()
10268        }
10269    }
10270}
10271#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10272#[doc = ""]
10273#[doc = "ID: 254"]
10274#[derive(Debug, Clone, PartialEq)]
10275#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10276#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10277#[cfg_attr(feature = "ts", derive(TS))]
10278#[cfg_attr(feature = "ts", ts(export))]
10279pub struct DEBUG_DATA {
10280    #[doc = "Timestamp (time since system boot)."]
10281    pub time_boot_ms: u32,
10282    #[doc = "DEBUG value"]
10283    pub value: f32,
10284    #[doc = "index of debug variable"]
10285    pub ind: u8,
10286}
10287impl DEBUG_DATA {
10288    pub const ENCODED_LEN: usize = 9usize;
10289    pub const DEFAULT: Self = Self {
10290        time_boot_ms: 0_u32,
10291        value: 0.0_f32,
10292        ind: 0_u8,
10293    };
10294    #[cfg(feature = "arbitrary")]
10295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10296        use arbitrary::{Arbitrary, Unstructured};
10297        let mut buf = [0u8; 1024];
10298        rng.fill_bytes(&mut buf);
10299        let mut unstructured = Unstructured::new(&buf);
10300        Self::arbitrary(&mut unstructured).unwrap_or_default()
10301    }
10302}
10303impl Default for DEBUG_DATA {
10304    fn default() -> Self {
10305        Self::DEFAULT.clone()
10306    }
10307}
10308impl MessageData for DEBUG_DATA {
10309    type Message = MavMessage;
10310    const ID: u32 = 254u32;
10311    const NAME: &'static str = "DEBUG";
10312    const EXTRA_CRC: u8 = 46u8;
10313    const ENCODED_LEN: usize = 9usize;
10314    fn deser(
10315        _version: MavlinkVersion,
10316        __input: &[u8],
10317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10318        let avail_len = __input.len();
10319        let mut payload_buf = [0; Self::ENCODED_LEN];
10320        let mut buf = if avail_len < Self::ENCODED_LEN {
10321            payload_buf[0..avail_len].copy_from_slice(__input);
10322            Bytes::new(&payload_buf)
10323        } else {
10324            Bytes::new(__input)
10325        };
10326        let mut __struct = Self::default();
10327        __struct.time_boot_ms = buf.get_u32_le()?;
10328        __struct.value = buf.get_f32_le()?;
10329        __struct.ind = buf.get_u8()?;
10330        Ok(__struct)
10331    }
10332    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10333        let mut __tmp = BytesMut::new(bytes);
10334        #[allow(clippy::absurd_extreme_comparisons)]
10335        #[allow(unused_comparisons)]
10336        if __tmp.remaining() < Self::ENCODED_LEN {
10337            panic!(
10338                "buffer is too small (need {} bytes, but got {})",
10339                Self::ENCODED_LEN,
10340                __tmp.remaining(),
10341            )
10342        }
10343        __tmp.put_u32_le(self.time_boot_ms);
10344        __tmp.put_f32_le(self.value);
10345        __tmp.put_u8(self.ind);
10346        if matches!(version, MavlinkVersion::V2) {
10347            let len = __tmp.len();
10348            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10349        } else {
10350            __tmp.len()
10351        }
10352    }
10353}
10354#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10355#[doc = ""]
10356#[doc = "ID: 350"]
10357#[derive(Debug, Clone, PartialEq)]
10358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10360#[cfg_attr(feature = "ts", derive(TS))]
10361#[cfg_attr(feature = "ts", ts(export))]
10362pub struct DEBUG_FLOAT_ARRAY_DATA {
10363    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10364    pub time_usec: u64,
10365    #[doc = "Unique ID used to discriminate between arrays"]
10366    pub array_id: u16,
10367    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10368    #[cfg_attr(feature = "ts", ts(type = "string"))]
10369    pub name: CharArray<10>,
10370    #[doc = "data"]
10371    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10372    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10373    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10374    pub data: [f32; 58],
10375}
10376impl DEBUG_FLOAT_ARRAY_DATA {
10377    pub const ENCODED_LEN: usize = 252usize;
10378    pub const DEFAULT: Self = Self {
10379        time_usec: 0_u64,
10380        array_id: 0_u16,
10381        name: CharArray::new([0_u8; 10usize]),
10382        data: [0.0_f32; 58usize],
10383    };
10384    #[cfg(feature = "arbitrary")]
10385    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10386        use arbitrary::{Arbitrary, Unstructured};
10387        let mut buf = [0u8; 1024];
10388        rng.fill_bytes(&mut buf);
10389        let mut unstructured = Unstructured::new(&buf);
10390        Self::arbitrary(&mut unstructured).unwrap_or_default()
10391    }
10392}
10393impl Default for DEBUG_FLOAT_ARRAY_DATA {
10394    fn default() -> Self {
10395        Self::DEFAULT.clone()
10396    }
10397}
10398impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10399    type Message = MavMessage;
10400    const ID: u32 = 350u32;
10401    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10402    const EXTRA_CRC: u8 = 232u8;
10403    const ENCODED_LEN: usize = 252usize;
10404    fn deser(
10405        _version: MavlinkVersion,
10406        __input: &[u8],
10407    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10408        let avail_len = __input.len();
10409        let mut payload_buf = [0; Self::ENCODED_LEN];
10410        let mut buf = if avail_len < Self::ENCODED_LEN {
10411            payload_buf[0..avail_len].copy_from_slice(__input);
10412            Bytes::new(&payload_buf)
10413        } else {
10414            Bytes::new(__input)
10415        };
10416        let mut __struct = Self::default();
10417        __struct.time_usec = buf.get_u64_le()?;
10418        __struct.array_id = buf.get_u16_le()?;
10419        let mut tmp = [0_u8; 10usize];
10420        for v in &mut tmp {
10421            *v = buf.get_u8()?;
10422        }
10423        __struct.name = CharArray::new(tmp);
10424        for v in &mut __struct.data {
10425            let val = buf.get_f32_le()?;
10426            *v = val;
10427        }
10428        Ok(__struct)
10429    }
10430    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10431        let mut __tmp = BytesMut::new(bytes);
10432        #[allow(clippy::absurd_extreme_comparisons)]
10433        #[allow(unused_comparisons)]
10434        if __tmp.remaining() < Self::ENCODED_LEN {
10435            panic!(
10436                "buffer is too small (need {} bytes, but got {})",
10437                Self::ENCODED_LEN,
10438                __tmp.remaining(),
10439            )
10440        }
10441        __tmp.put_u64_le(self.time_usec);
10442        __tmp.put_u16_le(self.array_id);
10443        for val in &self.name {
10444            __tmp.put_u8(*val);
10445        }
10446        if matches!(version, MavlinkVersion::V2) {
10447            for val in &self.data {
10448                __tmp.put_f32_le(*val);
10449            }
10450            let len = __tmp.len();
10451            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10452        } else {
10453            __tmp.len()
10454        }
10455    }
10456}
10457#[doc = "To debug something using a named 3D vector."]
10458#[doc = ""]
10459#[doc = "ID: 250"]
10460#[derive(Debug, Clone, PartialEq)]
10461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10462#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10463#[cfg_attr(feature = "ts", derive(TS))]
10464#[cfg_attr(feature = "ts", ts(export))]
10465pub struct DEBUG_VECT_DATA {
10466    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10467    pub time_usec: u64,
10468    #[doc = "x"]
10469    pub x: f32,
10470    #[doc = "y"]
10471    pub y: f32,
10472    #[doc = "z"]
10473    pub z: f32,
10474    #[doc = "Name"]
10475    #[cfg_attr(feature = "ts", ts(type = "string"))]
10476    pub name: CharArray<10>,
10477}
10478impl DEBUG_VECT_DATA {
10479    pub const ENCODED_LEN: usize = 30usize;
10480    pub const DEFAULT: Self = Self {
10481        time_usec: 0_u64,
10482        x: 0.0_f32,
10483        y: 0.0_f32,
10484        z: 0.0_f32,
10485        name: CharArray::new([0_u8; 10usize]),
10486    };
10487    #[cfg(feature = "arbitrary")]
10488    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10489        use arbitrary::{Arbitrary, Unstructured};
10490        let mut buf = [0u8; 1024];
10491        rng.fill_bytes(&mut buf);
10492        let mut unstructured = Unstructured::new(&buf);
10493        Self::arbitrary(&mut unstructured).unwrap_or_default()
10494    }
10495}
10496impl Default for DEBUG_VECT_DATA {
10497    fn default() -> Self {
10498        Self::DEFAULT.clone()
10499    }
10500}
10501impl MessageData for DEBUG_VECT_DATA {
10502    type Message = MavMessage;
10503    const ID: u32 = 250u32;
10504    const NAME: &'static str = "DEBUG_VECT";
10505    const EXTRA_CRC: u8 = 49u8;
10506    const ENCODED_LEN: usize = 30usize;
10507    fn deser(
10508        _version: MavlinkVersion,
10509        __input: &[u8],
10510    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10511        let avail_len = __input.len();
10512        let mut payload_buf = [0; Self::ENCODED_LEN];
10513        let mut buf = if avail_len < Self::ENCODED_LEN {
10514            payload_buf[0..avail_len].copy_from_slice(__input);
10515            Bytes::new(&payload_buf)
10516        } else {
10517            Bytes::new(__input)
10518        };
10519        let mut __struct = Self::default();
10520        __struct.time_usec = buf.get_u64_le()?;
10521        __struct.x = buf.get_f32_le()?;
10522        __struct.y = buf.get_f32_le()?;
10523        __struct.z = buf.get_f32_le()?;
10524        let mut tmp = [0_u8; 10usize];
10525        for v in &mut tmp {
10526            *v = buf.get_u8()?;
10527        }
10528        __struct.name = CharArray::new(tmp);
10529        Ok(__struct)
10530    }
10531    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10532        let mut __tmp = BytesMut::new(bytes);
10533        #[allow(clippy::absurd_extreme_comparisons)]
10534        #[allow(unused_comparisons)]
10535        if __tmp.remaining() < Self::ENCODED_LEN {
10536            panic!(
10537                "buffer is too small (need {} bytes, but got {})",
10538                Self::ENCODED_LEN,
10539                __tmp.remaining(),
10540            )
10541        }
10542        __tmp.put_u64_le(self.time_usec);
10543        __tmp.put_f32_le(self.x);
10544        __tmp.put_f32_le(self.y);
10545        __tmp.put_f32_le(self.z);
10546        for val in &self.name {
10547            __tmp.put_u8(*val);
10548        }
10549        if matches!(version, MavlinkVersion::V2) {
10550            let len = __tmp.len();
10551            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10552        } else {
10553            __tmp.len()
10554        }
10555    }
10556}
10557#[doc = "Distance sensor information for an onboard rangefinder."]
10558#[doc = ""]
10559#[doc = "ID: 132"]
10560#[derive(Debug, Clone, PartialEq)]
10561#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10563#[cfg_attr(feature = "ts", derive(TS))]
10564#[cfg_attr(feature = "ts", ts(export))]
10565pub struct DISTANCE_SENSOR_DATA {
10566    #[doc = "Timestamp (time since system boot)."]
10567    pub time_boot_ms: u32,
10568    #[doc = "Minimum distance the sensor can measure"]
10569    pub min_distance: u16,
10570    #[doc = "Maximum distance the sensor can measure"]
10571    pub max_distance: u16,
10572    #[doc = "Current distance reading"]
10573    pub current_distance: u16,
10574    #[doc = "Type of distance sensor."]
10575    pub mavtype: MavDistanceSensor,
10576    #[doc = "Onboard ID of the sensor"]
10577    pub id: u8,
10578    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10579    pub orientation: MavSensorOrientation,
10580    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10581    pub covariance: u8,
10582    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10583    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10584    pub horizontal_fov: f32,
10585    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10586    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10587    pub vertical_fov: f32,
10588    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10589    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10590    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10591    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10592    pub quaternion: [f32; 4],
10593    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10594    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10595    pub signal_quality: u8,
10596}
10597impl DISTANCE_SENSOR_DATA {
10598    pub const ENCODED_LEN: usize = 39usize;
10599    pub const DEFAULT: Self = Self {
10600        time_boot_ms: 0_u32,
10601        min_distance: 0_u16,
10602        max_distance: 0_u16,
10603        current_distance: 0_u16,
10604        mavtype: MavDistanceSensor::DEFAULT,
10605        id: 0_u8,
10606        orientation: MavSensorOrientation::DEFAULT,
10607        covariance: 0_u8,
10608        horizontal_fov: 0.0_f32,
10609        vertical_fov: 0.0_f32,
10610        quaternion: [0.0_f32; 4usize],
10611        signal_quality: 0_u8,
10612    };
10613    #[cfg(feature = "arbitrary")]
10614    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10615        use arbitrary::{Arbitrary, Unstructured};
10616        let mut buf = [0u8; 1024];
10617        rng.fill_bytes(&mut buf);
10618        let mut unstructured = Unstructured::new(&buf);
10619        Self::arbitrary(&mut unstructured).unwrap_or_default()
10620    }
10621}
10622impl Default for DISTANCE_SENSOR_DATA {
10623    fn default() -> Self {
10624        Self::DEFAULT.clone()
10625    }
10626}
10627impl MessageData for DISTANCE_SENSOR_DATA {
10628    type Message = MavMessage;
10629    const ID: u32 = 132u32;
10630    const NAME: &'static str = "DISTANCE_SENSOR";
10631    const EXTRA_CRC: u8 = 85u8;
10632    const ENCODED_LEN: usize = 39usize;
10633    fn deser(
10634        _version: MavlinkVersion,
10635        __input: &[u8],
10636    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10637        let avail_len = __input.len();
10638        let mut payload_buf = [0; Self::ENCODED_LEN];
10639        let mut buf = if avail_len < Self::ENCODED_LEN {
10640            payload_buf[0..avail_len].copy_from_slice(__input);
10641            Bytes::new(&payload_buf)
10642        } else {
10643            Bytes::new(__input)
10644        };
10645        let mut __struct = Self::default();
10646        __struct.time_boot_ms = buf.get_u32_le()?;
10647        __struct.min_distance = buf.get_u16_le()?;
10648        __struct.max_distance = buf.get_u16_le()?;
10649        __struct.current_distance = buf.get_u16_le()?;
10650        let tmp = buf.get_u8()?;
10651        __struct.mavtype =
10652            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10653                enum_type: "MavDistanceSensor",
10654                value: tmp as u64,
10655            })?;
10656        __struct.id = buf.get_u8()?;
10657        let tmp = buf.get_u8()?;
10658        __struct.orientation =
10659            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10660                enum_type: "MavSensorOrientation",
10661                value: tmp as u64,
10662            })?;
10663        __struct.covariance = buf.get_u8()?;
10664        __struct.horizontal_fov = buf.get_f32_le()?;
10665        __struct.vertical_fov = buf.get_f32_le()?;
10666        for v in &mut __struct.quaternion {
10667            let val = buf.get_f32_le()?;
10668            *v = val;
10669        }
10670        __struct.signal_quality = buf.get_u8()?;
10671        Ok(__struct)
10672    }
10673    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10674        let mut __tmp = BytesMut::new(bytes);
10675        #[allow(clippy::absurd_extreme_comparisons)]
10676        #[allow(unused_comparisons)]
10677        if __tmp.remaining() < Self::ENCODED_LEN {
10678            panic!(
10679                "buffer is too small (need {} bytes, but got {})",
10680                Self::ENCODED_LEN,
10681                __tmp.remaining(),
10682            )
10683        }
10684        __tmp.put_u32_le(self.time_boot_ms);
10685        __tmp.put_u16_le(self.min_distance);
10686        __tmp.put_u16_le(self.max_distance);
10687        __tmp.put_u16_le(self.current_distance);
10688        __tmp.put_u8(self.mavtype as u8);
10689        __tmp.put_u8(self.id);
10690        __tmp.put_u8(self.orientation as u8);
10691        __tmp.put_u8(self.covariance);
10692        if matches!(version, MavlinkVersion::V2) {
10693            __tmp.put_f32_le(self.horizontal_fov);
10694            __tmp.put_f32_le(self.vertical_fov);
10695            for val in &self.quaternion {
10696                __tmp.put_f32_le(*val);
10697            }
10698            __tmp.put_u8(self.signal_quality);
10699            let len = __tmp.len();
10700            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10701        } else {
10702            __tmp.len()
10703        }
10704    }
10705}
10706#[doc = "EFI status output."]
10707#[doc = ""]
10708#[doc = "ID: 225"]
10709#[derive(Debug, Clone, PartialEq)]
10710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10712#[cfg_attr(feature = "ts", derive(TS))]
10713#[cfg_attr(feature = "ts", ts(export))]
10714pub struct EFI_STATUS_DATA {
10715    #[doc = "ECU index"]
10716    pub ecu_index: f32,
10717    #[doc = "RPM"]
10718    pub rpm: f32,
10719    #[doc = "Fuel consumed"]
10720    pub fuel_consumed: f32,
10721    #[doc = "Fuel flow rate"]
10722    pub fuel_flow: f32,
10723    #[doc = "Engine load"]
10724    pub engine_load: f32,
10725    #[doc = "Throttle position"]
10726    pub throttle_position: f32,
10727    #[doc = "Spark dwell time"]
10728    pub spark_dwell_time: f32,
10729    #[doc = "Barometric pressure"]
10730    pub barometric_pressure: f32,
10731    #[doc = "Intake manifold pressure("]
10732    pub intake_manifold_pressure: f32,
10733    #[doc = "Intake manifold temperature"]
10734    pub intake_manifold_temperature: f32,
10735    #[doc = "Cylinder head temperature"]
10736    pub cylinder_head_temperature: f32,
10737    #[doc = "Ignition timing (Crank angle degrees)"]
10738    pub ignition_timing: f32,
10739    #[doc = "Injection time"]
10740    pub injection_time: f32,
10741    #[doc = "Exhaust gas temperature"]
10742    pub exhaust_gas_temperature: f32,
10743    #[doc = "Output throttle"]
10744    pub throttle_out: f32,
10745    #[doc = "Pressure/temperature compensation"]
10746    pub pt_compensation: f32,
10747    #[doc = "EFI health status"]
10748    pub health: u8,
10749    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10750    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10751    pub ignition_voltage: f32,
10752    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10753    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10754    pub fuel_pressure: f32,
10755}
10756impl EFI_STATUS_DATA {
10757    pub const ENCODED_LEN: usize = 73usize;
10758    pub const DEFAULT: Self = Self {
10759        ecu_index: 0.0_f32,
10760        rpm: 0.0_f32,
10761        fuel_consumed: 0.0_f32,
10762        fuel_flow: 0.0_f32,
10763        engine_load: 0.0_f32,
10764        throttle_position: 0.0_f32,
10765        spark_dwell_time: 0.0_f32,
10766        barometric_pressure: 0.0_f32,
10767        intake_manifold_pressure: 0.0_f32,
10768        intake_manifold_temperature: 0.0_f32,
10769        cylinder_head_temperature: 0.0_f32,
10770        ignition_timing: 0.0_f32,
10771        injection_time: 0.0_f32,
10772        exhaust_gas_temperature: 0.0_f32,
10773        throttle_out: 0.0_f32,
10774        pt_compensation: 0.0_f32,
10775        health: 0_u8,
10776        ignition_voltage: 0.0_f32,
10777        fuel_pressure: 0.0_f32,
10778    };
10779    #[cfg(feature = "arbitrary")]
10780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10781        use arbitrary::{Arbitrary, Unstructured};
10782        let mut buf = [0u8; 1024];
10783        rng.fill_bytes(&mut buf);
10784        let mut unstructured = Unstructured::new(&buf);
10785        Self::arbitrary(&mut unstructured).unwrap_or_default()
10786    }
10787}
10788impl Default for EFI_STATUS_DATA {
10789    fn default() -> Self {
10790        Self::DEFAULT.clone()
10791    }
10792}
10793impl MessageData for EFI_STATUS_DATA {
10794    type Message = MavMessage;
10795    const ID: u32 = 225u32;
10796    const NAME: &'static str = "EFI_STATUS";
10797    const EXTRA_CRC: u8 = 208u8;
10798    const ENCODED_LEN: usize = 73usize;
10799    fn deser(
10800        _version: MavlinkVersion,
10801        __input: &[u8],
10802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10803        let avail_len = __input.len();
10804        let mut payload_buf = [0; Self::ENCODED_LEN];
10805        let mut buf = if avail_len < Self::ENCODED_LEN {
10806            payload_buf[0..avail_len].copy_from_slice(__input);
10807            Bytes::new(&payload_buf)
10808        } else {
10809            Bytes::new(__input)
10810        };
10811        let mut __struct = Self::default();
10812        __struct.ecu_index = buf.get_f32_le()?;
10813        __struct.rpm = buf.get_f32_le()?;
10814        __struct.fuel_consumed = buf.get_f32_le()?;
10815        __struct.fuel_flow = buf.get_f32_le()?;
10816        __struct.engine_load = buf.get_f32_le()?;
10817        __struct.throttle_position = buf.get_f32_le()?;
10818        __struct.spark_dwell_time = buf.get_f32_le()?;
10819        __struct.barometric_pressure = buf.get_f32_le()?;
10820        __struct.intake_manifold_pressure = buf.get_f32_le()?;
10821        __struct.intake_manifold_temperature = buf.get_f32_le()?;
10822        __struct.cylinder_head_temperature = buf.get_f32_le()?;
10823        __struct.ignition_timing = buf.get_f32_le()?;
10824        __struct.injection_time = buf.get_f32_le()?;
10825        __struct.exhaust_gas_temperature = buf.get_f32_le()?;
10826        __struct.throttle_out = buf.get_f32_le()?;
10827        __struct.pt_compensation = buf.get_f32_le()?;
10828        __struct.health = buf.get_u8()?;
10829        __struct.ignition_voltage = buf.get_f32_le()?;
10830        __struct.fuel_pressure = buf.get_f32_le()?;
10831        Ok(__struct)
10832    }
10833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10834        let mut __tmp = BytesMut::new(bytes);
10835        #[allow(clippy::absurd_extreme_comparisons)]
10836        #[allow(unused_comparisons)]
10837        if __tmp.remaining() < Self::ENCODED_LEN {
10838            panic!(
10839                "buffer is too small (need {} bytes, but got {})",
10840                Self::ENCODED_LEN,
10841                __tmp.remaining(),
10842            )
10843        }
10844        __tmp.put_f32_le(self.ecu_index);
10845        __tmp.put_f32_le(self.rpm);
10846        __tmp.put_f32_le(self.fuel_consumed);
10847        __tmp.put_f32_le(self.fuel_flow);
10848        __tmp.put_f32_le(self.engine_load);
10849        __tmp.put_f32_le(self.throttle_position);
10850        __tmp.put_f32_le(self.spark_dwell_time);
10851        __tmp.put_f32_le(self.barometric_pressure);
10852        __tmp.put_f32_le(self.intake_manifold_pressure);
10853        __tmp.put_f32_le(self.intake_manifold_temperature);
10854        __tmp.put_f32_le(self.cylinder_head_temperature);
10855        __tmp.put_f32_le(self.ignition_timing);
10856        __tmp.put_f32_le(self.injection_time);
10857        __tmp.put_f32_le(self.exhaust_gas_temperature);
10858        __tmp.put_f32_le(self.throttle_out);
10859        __tmp.put_f32_le(self.pt_compensation);
10860        __tmp.put_u8(self.health);
10861        if matches!(version, MavlinkVersion::V2) {
10862            __tmp.put_f32_le(self.ignition_voltage);
10863            __tmp.put_f32_le(self.fuel_pressure);
10864            let len = __tmp.len();
10865            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10866        } else {
10867            __tmp.len()
10868        }
10869    }
10870}
10871#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10872#[doc = ""]
10873#[doc = "ID: 131"]
10874#[derive(Debug, Clone, PartialEq)]
10875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10877#[cfg_attr(feature = "ts", derive(TS))]
10878#[cfg_attr(feature = "ts", ts(export))]
10879pub struct ENCAPSULATED_DATA_DATA {
10880    #[doc = "sequence number (starting with 0 on every transmission)"]
10881    pub seqnr: u16,
10882    #[doc = "image data bytes"]
10883    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10884    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10885    pub data: [u8; 253],
10886}
10887impl ENCAPSULATED_DATA_DATA {
10888    pub const ENCODED_LEN: usize = 255usize;
10889    pub const DEFAULT: Self = Self {
10890        seqnr: 0_u16,
10891        data: [0_u8; 253usize],
10892    };
10893    #[cfg(feature = "arbitrary")]
10894    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10895        use arbitrary::{Arbitrary, Unstructured};
10896        let mut buf = [0u8; 1024];
10897        rng.fill_bytes(&mut buf);
10898        let mut unstructured = Unstructured::new(&buf);
10899        Self::arbitrary(&mut unstructured).unwrap_or_default()
10900    }
10901}
10902impl Default for ENCAPSULATED_DATA_DATA {
10903    fn default() -> Self {
10904        Self::DEFAULT.clone()
10905    }
10906}
10907impl MessageData for ENCAPSULATED_DATA_DATA {
10908    type Message = MavMessage;
10909    const ID: u32 = 131u32;
10910    const NAME: &'static str = "ENCAPSULATED_DATA";
10911    const EXTRA_CRC: u8 = 223u8;
10912    const ENCODED_LEN: usize = 255usize;
10913    fn deser(
10914        _version: MavlinkVersion,
10915        __input: &[u8],
10916    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10917        let avail_len = __input.len();
10918        let mut payload_buf = [0; Self::ENCODED_LEN];
10919        let mut buf = if avail_len < Self::ENCODED_LEN {
10920            payload_buf[0..avail_len].copy_from_slice(__input);
10921            Bytes::new(&payload_buf)
10922        } else {
10923            Bytes::new(__input)
10924        };
10925        let mut __struct = Self::default();
10926        __struct.seqnr = buf.get_u16_le()?;
10927        for v in &mut __struct.data {
10928            let val = buf.get_u8()?;
10929            *v = val;
10930        }
10931        Ok(__struct)
10932    }
10933    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10934        let mut __tmp = BytesMut::new(bytes);
10935        #[allow(clippy::absurd_extreme_comparisons)]
10936        #[allow(unused_comparisons)]
10937        if __tmp.remaining() < Self::ENCODED_LEN {
10938            panic!(
10939                "buffer is too small (need {} bytes, but got {})",
10940                Self::ENCODED_LEN,
10941                __tmp.remaining(),
10942            )
10943        }
10944        __tmp.put_u16_le(self.seqnr);
10945        for val in &self.data {
10946            __tmp.put_u8(*val);
10947        }
10948        if matches!(version, MavlinkVersion::V2) {
10949            let len = __tmp.len();
10950            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10951        } else {
10952            __tmp.len()
10953        }
10954    }
10955}
10956#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
10957#[doc = ""]
10958#[doc = "ID: 290"]
10959#[derive(Debug, Clone, PartialEq)]
10960#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10961#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10962#[cfg_attr(feature = "ts", derive(TS))]
10963#[cfg_attr(feature = "ts", ts(export))]
10964pub struct ESC_INFO_DATA {
10965    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10966    pub time_usec: u64,
10967    #[doc = "Number of reported errors by each ESC since boot."]
10968    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10969    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10970    pub error_count: [u32; 4],
10971    #[doc = "Counter of data packets received."]
10972    pub counter: u16,
10973    #[doc = "Bitmap of ESC failure flags."]
10974    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10975    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10976    pub failure_flags: [u16; 4],
10977    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
10978    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10979    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10980    pub temperature: [i16; 4],
10981    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10982    pub index: u8,
10983    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
10984    pub count: u8,
10985    #[doc = "Connection type protocol for all ESC."]
10986    pub connection_type: EscConnectionType,
10987    #[doc = "Information regarding online/offline status of each ESC."]
10988    pub info: u8,
10989}
10990impl ESC_INFO_DATA {
10991    pub const ENCODED_LEN: usize = 46usize;
10992    pub const DEFAULT: Self = Self {
10993        time_usec: 0_u64,
10994        error_count: [0_u32; 4usize],
10995        counter: 0_u16,
10996        failure_flags: [0_u16; 4usize],
10997        temperature: [0_i16; 4usize],
10998        index: 0_u8,
10999        count: 0_u8,
11000        connection_type: EscConnectionType::DEFAULT,
11001        info: 0_u8,
11002    };
11003    #[cfg(feature = "arbitrary")]
11004    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11005        use arbitrary::{Arbitrary, Unstructured};
11006        let mut buf = [0u8; 1024];
11007        rng.fill_bytes(&mut buf);
11008        let mut unstructured = Unstructured::new(&buf);
11009        Self::arbitrary(&mut unstructured).unwrap_or_default()
11010    }
11011}
11012impl Default for ESC_INFO_DATA {
11013    fn default() -> Self {
11014        Self::DEFAULT.clone()
11015    }
11016}
11017impl MessageData for ESC_INFO_DATA {
11018    type Message = MavMessage;
11019    const ID: u32 = 290u32;
11020    const NAME: &'static str = "ESC_INFO";
11021    const EXTRA_CRC: u8 = 251u8;
11022    const ENCODED_LEN: usize = 46usize;
11023    fn deser(
11024        _version: MavlinkVersion,
11025        __input: &[u8],
11026    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11027        let avail_len = __input.len();
11028        let mut payload_buf = [0; Self::ENCODED_LEN];
11029        let mut buf = if avail_len < Self::ENCODED_LEN {
11030            payload_buf[0..avail_len].copy_from_slice(__input);
11031            Bytes::new(&payload_buf)
11032        } else {
11033            Bytes::new(__input)
11034        };
11035        let mut __struct = Self::default();
11036        __struct.time_usec = buf.get_u64_le()?;
11037        for v in &mut __struct.error_count {
11038            let val = buf.get_u32_le()?;
11039            *v = val;
11040        }
11041        __struct.counter = buf.get_u16_le()?;
11042        for v in &mut __struct.failure_flags {
11043            let val = buf.get_u16_le()?;
11044            *v = val;
11045        }
11046        for v in &mut __struct.temperature {
11047            let val = buf.get_i16_le()?;
11048            *v = val;
11049        }
11050        __struct.index = buf.get_u8()?;
11051        __struct.count = buf.get_u8()?;
11052        let tmp = buf.get_u8()?;
11053        __struct.connection_type =
11054            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11055                enum_type: "EscConnectionType",
11056                value: tmp as u64,
11057            })?;
11058        __struct.info = buf.get_u8()?;
11059        Ok(__struct)
11060    }
11061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11062        let mut __tmp = BytesMut::new(bytes);
11063        #[allow(clippy::absurd_extreme_comparisons)]
11064        #[allow(unused_comparisons)]
11065        if __tmp.remaining() < Self::ENCODED_LEN {
11066            panic!(
11067                "buffer is too small (need {} bytes, but got {})",
11068                Self::ENCODED_LEN,
11069                __tmp.remaining(),
11070            )
11071        }
11072        __tmp.put_u64_le(self.time_usec);
11073        for val in &self.error_count {
11074            __tmp.put_u32_le(*val);
11075        }
11076        __tmp.put_u16_le(self.counter);
11077        for val in &self.failure_flags {
11078            __tmp.put_u16_le(*val);
11079        }
11080        for val in &self.temperature {
11081            __tmp.put_i16_le(*val);
11082        }
11083        __tmp.put_u8(self.index);
11084        __tmp.put_u8(self.count);
11085        __tmp.put_u8(self.connection_type as u8);
11086        __tmp.put_u8(self.info);
11087        if matches!(version, MavlinkVersion::V2) {
11088            let len = __tmp.len();
11089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11090        } else {
11091            __tmp.len()
11092        }
11093    }
11094}
11095#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11096#[doc = ""]
11097#[doc = "ID: 291"]
11098#[derive(Debug, Clone, PartialEq)]
11099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11101#[cfg_attr(feature = "ts", derive(TS))]
11102#[cfg_attr(feature = "ts", ts(export))]
11103pub struct ESC_STATUS_DATA {
11104    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11105    pub time_usec: u64,
11106    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11107    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11108    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11109    pub rpm: [i32; 4],
11110    #[doc = "Voltage measured from each ESC."]
11111    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11112    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11113    pub voltage: [f32; 4],
11114    #[doc = "Current measured from each ESC."]
11115    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11116    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11117    pub current: [f32; 4],
11118    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11119    pub index: u8,
11120}
11121impl ESC_STATUS_DATA {
11122    pub const ENCODED_LEN: usize = 57usize;
11123    pub const DEFAULT: Self = Self {
11124        time_usec: 0_u64,
11125        rpm: [0_i32; 4usize],
11126        voltage: [0.0_f32; 4usize],
11127        current: [0.0_f32; 4usize],
11128        index: 0_u8,
11129    };
11130    #[cfg(feature = "arbitrary")]
11131    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11132        use arbitrary::{Arbitrary, Unstructured};
11133        let mut buf = [0u8; 1024];
11134        rng.fill_bytes(&mut buf);
11135        let mut unstructured = Unstructured::new(&buf);
11136        Self::arbitrary(&mut unstructured).unwrap_or_default()
11137    }
11138}
11139impl Default for ESC_STATUS_DATA {
11140    fn default() -> Self {
11141        Self::DEFAULT.clone()
11142    }
11143}
11144impl MessageData for ESC_STATUS_DATA {
11145    type Message = MavMessage;
11146    const ID: u32 = 291u32;
11147    const NAME: &'static str = "ESC_STATUS";
11148    const EXTRA_CRC: u8 = 10u8;
11149    const ENCODED_LEN: usize = 57usize;
11150    fn deser(
11151        _version: MavlinkVersion,
11152        __input: &[u8],
11153    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11154        let avail_len = __input.len();
11155        let mut payload_buf = [0; Self::ENCODED_LEN];
11156        let mut buf = if avail_len < Self::ENCODED_LEN {
11157            payload_buf[0..avail_len].copy_from_slice(__input);
11158            Bytes::new(&payload_buf)
11159        } else {
11160            Bytes::new(__input)
11161        };
11162        let mut __struct = Self::default();
11163        __struct.time_usec = buf.get_u64_le()?;
11164        for v in &mut __struct.rpm {
11165            let val = buf.get_i32_le()?;
11166            *v = val;
11167        }
11168        for v in &mut __struct.voltage {
11169            let val = buf.get_f32_le()?;
11170            *v = val;
11171        }
11172        for v in &mut __struct.current {
11173            let val = buf.get_f32_le()?;
11174            *v = val;
11175        }
11176        __struct.index = buf.get_u8()?;
11177        Ok(__struct)
11178    }
11179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11180        let mut __tmp = BytesMut::new(bytes);
11181        #[allow(clippy::absurd_extreme_comparisons)]
11182        #[allow(unused_comparisons)]
11183        if __tmp.remaining() < Self::ENCODED_LEN {
11184            panic!(
11185                "buffer is too small (need {} bytes, but got {})",
11186                Self::ENCODED_LEN,
11187                __tmp.remaining(),
11188            )
11189        }
11190        __tmp.put_u64_le(self.time_usec);
11191        for val in &self.rpm {
11192            __tmp.put_i32_le(*val);
11193        }
11194        for val in &self.voltage {
11195            __tmp.put_f32_le(*val);
11196        }
11197        for val in &self.current {
11198            __tmp.put_f32_le(*val);
11199        }
11200        __tmp.put_u8(self.index);
11201        if matches!(version, MavlinkVersion::V2) {
11202            let len = __tmp.len();
11203            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11204        } else {
11205            __tmp.len()
11206        }
11207    }
11208}
11209#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11210#[doc = ""]
11211#[doc = "ID: 230"]
11212#[derive(Debug, Clone, PartialEq)]
11213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11214#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11215#[cfg_attr(feature = "ts", derive(TS))]
11216#[cfg_attr(feature = "ts", ts(export))]
11217pub struct ESTIMATOR_STATUS_DATA {
11218    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11219    pub time_usec: u64,
11220    #[doc = "Velocity innovation test ratio"]
11221    pub vel_ratio: f32,
11222    #[doc = "Horizontal position innovation test ratio"]
11223    pub pos_horiz_ratio: f32,
11224    #[doc = "Vertical position innovation test ratio"]
11225    pub pos_vert_ratio: f32,
11226    #[doc = "Magnetometer innovation test ratio"]
11227    pub mag_ratio: f32,
11228    #[doc = "Height above terrain innovation test ratio"]
11229    pub hagl_ratio: f32,
11230    #[doc = "True airspeed innovation test ratio"]
11231    pub tas_ratio: f32,
11232    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11233    pub pos_horiz_accuracy: f32,
11234    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11235    pub pos_vert_accuracy: f32,
11236    #[doc = "Bitmap indicating which EKF outputs are valid."]
11237    pub flags: EstimatorStatusFlags,
11238}
11239impl ESTIMATOR_STATUS_DATA {
11240    pub const ENCODED_LEN: usize = 42usize;
11241    pub const DEFAULT: Self = Self {
11242        time_usec: 0_u64,
11243        vel_ratio: 0.0_f32,
11244        pos_horiz_ratio: 0.0_f32,
11245        pos_vert_ratio: 0.0_f32,
11246        mag_ratio: 0.0_f32,
11247        hagl_ratio: 0.0_f32,
11248        tas_ratio: 0.0_f32,
11249        pos_horiz_accuracy: 0.0_f32,
11250        pos_vert_accuracy: 0.0_f32,
11251        flags: EstimatorStatusFlags::DEFAULT,
11252    };
11253    #[cfg(feature = "arbitrary")]
11254    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11255        use arbitrary::{Arbitrary, Unstructured};
11256        let mut buf = [0u8; 1024];
11257        rng.fill_bytes(&mut buf);
11258        let mut unstructured = Unstructured::new(&buf);
11259        Self::arbitrary(&mut unstructured).unwrap_or_default()
11260    }
11261}
11262impl Default for ESTIMATOR_STATUS_DATA {
11263    fn default() -> Self {
11264        Self::DEFAULT.clone()
11265    }
11266}
11267impl MessageData for ESTIMATOR_STATUS_DATA {
11268    type Message = MavMessage;
11269    const ID: u32 = 230u32;
11270    const NAME: &'static str = "ESTIMATOR_STATUS";
11271    const EXTRA_CRC: u8 = 163u8;
11272    const ENCODED_LEN: usize = 42usize;
11273    fn deser(
11274        _version: MavlinkVersion,
11275        __input: &[u8],
11276    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11277        let avail_len = __input.len();
11278        let mut payload_buf = [0; Self::ENCODED_LEN];
11279        let mut buf = if avail_len < Self::ENCODED_LEN {
11280            payload_buf[0..avail_len].copy_from_slice(__input);
11281            Bytes::new(&payload_buf)
11282        } else {
11283            Bytes::new(__input)
11284        };
11285        let mut __struct = Self::default();
11286        __struct.time_usec = buf.get_u64_le()?;
11287        __struct.vel_ratio = buf.get_f32_le()?;
11288        __struct.pos_horiz_ratio = buf.get_f32_le()?;
11289        __struct.pos_vert_ratio = buf.get_f32_le()?;
11290        __struct.mag_ratio = buf.get_f32_le()?;
11291        __struct.hagl_ratio = buf.get_f32_le()?;
11292        __struct.tas_ratio = buf.get_f32_le()?;
11293        __struct.pos_horiz_accuracy = buf.get_f32_le()?;
11294        __struct.pos_vert_accuracy = buf.get_f32_le()?;
11295        let tmp = buf.get_u16_le()?;
11296        __struct.flags = EstimatorStatusFlags::from_bits(
11297            tmp as <EstimatorStatusFlags as Flags>::Bits,
11298        )
11299        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11300            flag_type: "EstimatorStatusFlags",
11301            value: tmp as u64,
11302        })?;
11303        Ok(__struct)
11304    }
11305    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11306        let mut __tmp = BytesMut::new(bytes);
11307        #[allow(clippy::absurd_extreme_comparisons)]
11308        #[allow(unused_comparisons)]
11309        if __tmp.remaining() < Self::ENCODED_LEN {
11310            panic!(
11311                "buffer is too small (need {} bytes, but got {})",
11312                Self::ENCODED_LEN,
11313                __tmp.remaining(),
11314            )
11315        }
11316        __tmp.put_u64_le(self.time_usec);
11317        __tmp.put_f32_le(self.vel_ratio);
11318        __tmp.put_f32_le(self.pos_horiz_ratio);
11319        __tmp.put_f32_le(self.pos_vert_ratio);
11320        __tmp.put_f32_le(self.mag_ratio);
11321        __tmp.put_f32_le(self.hagl_ratio);
11322        __tmp.put_f32_le(self.tas_ratio);
11323        __tmp.put_f32_le(self.pos_horiz_accuracy);
11324        __tmp.put_f32_le(self.pos_vert_accuracy);
11325        __tmp.put_u16_le(self.flags.bits() as u16);
11326        if matches!(version, MavlinkVersion::V2) {
11327            let len = __tmp.len();
11328            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11329        } else {
11330            __tmp.len()
11331        }
11332    }
11333}
11334#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11335#[doc = ""]
11336#[doc = "ID: 410"]
11337#[derive(Debug, Clone, PartialEq)]
11338#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11340#[cfg_attr(feature = "ts", derive(TS))]
11341#[cfg_attr(feature = "ts", ts(export))]
11342pub struct EVENT_DATA {
11343    #[doc = "Event ID (as defined in the component metadata)"]
11344    pub id: u32,
11345    #[doc = "Timestamp (time since system boot when the event happened)."]
11346    pub event_time_boot_ms: u32,
11347    #[doc = "Sequence number."]
11348    pub sequence: u16,
11349    #[doc = "Component ID"]
11350    pub destination_component: u8,
11351    #[doc = "System ID"]
11352    pub destination_system: u8,
11353    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11354    pub log_levels: u8,
11355    #[doc = "Arguments (depend on event ID)."]
11356    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11357    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11358    pub arguments: [u8; 40],
11359}
11360impl EVENT_DATA {
11361    pub const ENCODED_LEN: usize = 53usize;
11362    pub const DEFAULT: Self = Self {
11363        id: 0_u32,
11364        event_time_boot_ms: 0_u32,
11365        sequence: 0_u16,
11366        destination_component: 0_u8,
11367        destination_system: 0_u8,
11368        log_levels: 0_u8,
11369        arguments: [0_u8; 40usize],
11370    };
11371    #[cfg(feature = "arbitrary")]
11372    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11373        use arbitrary::{Arbitrary, Unstructured};
11374        let mut buf = [0u8; 1024];
11375        rng.fill_bytes(&mut buf);
11376        let mut unstructured = Unstructured::new(&buf);
11377        Self::arbitrary(&mut unstructured).unwrap_or_default()
11378    }
11379}
11380impl Default for EVENT_DATA {
11381    fn default() -> Self {
11382        Self::DEFAULT.clone()
11383    }
11384}
11385impl MessageData for EVENT_DATA {
11386    type Message = MavMessage;
11387    const ID: u32 = 410u32;
11388    const NAME: &'static str = "EVENT";
11389    const EXTRA_CRC: u8 = 160u8;
11390    const ENCODED_LEN: usize = 53usize;
11391    fn deser(
11392        _version: MavlinkVersion,
11393        __input: &[u8],
11394    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11395        let avail_len = __input.len();
11396        let mut payload_buf = [0; Self::ENCODED_LEN];
11397        let mut buf = if avail_len < Self::ENCODED_LEN {
11398            payload_buf[0..avail_len].copy_from_slice(__input);
11399            Bytes::new(&payload_buf)
11400        } else {
11401            Bytes::new(__input)
11402        };
11403        let mut __struct = Self::default();
11404        __struct.id = buf.get_u32_le()?;
11405        __struct.event_time_boot_ms = buf.get_u32_le()?;
11406        __struct.sequence = buf.get_u16_le()?;
11407        __struct.destination_component = buf.get_u8()?;
11408        __struct.destination_system = buf.get_u8()?;
11409        __struct.log_levels = buf.get_u8()?;
11410        for v in &mut __struct.arguments {
11411            let val = buf.get_u8()?;
11412            *v = val;
11413        }
11414        Ok(__struct)
11415    }
11416    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11417        let mut __tmp = BytesMut::new(bytes);
11418        #[allow(clippy::absurd_extreme_comparisons)]
11419        #[allow(unused_comparisons)]
11420        if __tmp.remaining() < Self::ENCODED_LEN {
11421            panic!(
11422                "buffer is too small (need {} bytes, but got {})",
11423                Self::ENCODED_LEN,
11424                __tmp.remaining(),
11425            )
11426        }
11427        __tmp.put_u32_le(self.id);
11428        __tmp.put_u32_le(self.event_time_boot_ms);
11429        __tmp.put_u16_le(self.sequence);
11430        __tmp.put_u8(self.destination_component);
11431        __tmp.put_u8(self.destination_system);
11432        __tmp.put_u8(self.log_levels);
11433        for val in &self.arguments {
11434            __tmp.put_u8(*val);
11435        }
11436        if matches!(version, MavlinkVersion::V2) {
11437            let len = __tmp.len();
11438            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11439        } else {
11440            __tmp.len()
11441        }
11442    }
11443}
11444#[doc = "Provides state for additional features."]
11445#[doc = ""]
11446#[doc = "ID: 245"]
11447#[derive(Debug, Clone, PartialEq)]
11448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11450#[cfg_attr(feature = "ts", derive(TS))]
11451#[cfg_attr(feature = "ts", ts(export))]
11452pub struct EXTENDED_SYS_STATE_DATA {
11453    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11454    pub vtol_state: MavVtolState,
11455    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11456    pub landed_state: MavLandedState,
11457}
11458impl EXTENDED_SYS_STATE_DATA {
11459    pub const ENCODED_LEN: usize = 2usize;
11460    pub const DEFAULT: Self = Self {
11461        vtol_state: MavVtolState::DEFAULT,
11462        landed_state: MavLandedState::DEFAULT,
11463    };
11464    #[cfg(feature = "arbitrary")]
11465    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11466        use arbitrary::{Arbitrary, Unstructured};
11467        let mut buf = [0u8; 1024];
11468        rng.fill_bytes(&mut buf);
11469        let mut unstructured = Unstructured::new(&buf);
11470        Self::arbitrary(&mut unstructured).unwrap_or_default()
11471    }
11472}
11473impl Default for EXTENDED_SYS_STATE_DATA {
11474    fn default() -> Self {
11475        Self::DEFAULT.clone()
11476    }
11477}
11478impl MessageData for EXTENDED_SYS_STATE_DATA {
11479    type Message = MavMessage;
11480    const ID: u32 = 245u32;
11481    const NAME: &'static str = "EXTENDED_SYS_STATE";
11482    const EXTRA_CRC: u8 = 130u8;
11483    const ENCODED_LEN: usize = 2usize;
11484    fn deser(
11485        _version: MavlinkVersion,
11486        __input: &[u8],
11487    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11488        let avail_len = __input.len();
11489        let mut payload_buf = [0; Self::ENCODED_LEN];
11490        let mut buf = if avail_len < Self::ENCODED_LEN {
11491            payload_buf[0..avail_len].copy_from_slice(__input);
11492            Bytes::new(&payload_buf)
11493        } else {
11494            Bytes::new(__input)
11495        };
11496        let mut __struct = Self::default();
11497        let tmp = buf.get_u8()?;
11498        __struct.vtol_state =
11499            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11500                enum_type: "MavVtolState",
11501                value: tmp as u64,
11502            })?;
11503        let tmp = buf.get_u8()?;
11504        __struct.landed_state =
11505            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11506                enum_type: "MavLandedState",
11507                value: tmp as u64,
11508            })?;
11509        Ok(__struct)
11510    }
11511    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11512        let mut __tmp = BytesMut::new(bytes);
11513        #[allow(clippy::absurd_extreme_comparisons)]
11514        #[allow(unused_comparisons)]
11515        if __tmp.remaining() < Self::ENCODED_LEN {
11516            panic!(
11517                "buffer is too small (need {} bytes, but got {})",
11518                Self::ENCODED_LEN,
11519                __tmp.remaining(),
11520            )
11521        }
11522        __tmp.put_u8(self.vtol_state as u8);
11523        __tmp.put_u8(self.landed_state as u8);
11524        if matches!(version, MavlinkVersion::V2) {
11525            let len = __tmp.len();
11526            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11527        } else {
11528            __tmp.len()
11529        }
11530    }
11531}
11532#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11533#[doc = ""]
11534#[doc = "ID: 162"]
11535#[derive(Debug, Clone, PartialEq)]
11536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11538#[cfg_attr(feature = "ts", derive(TS))]
11539#[cfg_attr(feature = "ts", ts(export))]
11540pub struct FENCE_STATUS_DATA {
11541    #[doc = "Time (since boot) of last breach."]
11542    pub breach_time: u32,
11543    #[doc = "Number of fence breaches."]
11544    pub breach_count: u16,
11545    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11546    pub breach_status: u8,
11547    #[doc = "Last breach type."]
11548    pub breach_type: FenceBreach,
11549    #[doc = "Active action to prevent fence breach"]
11550    #[cfg_attr(feature = "serde", serde(default))]
11551    pub breach_mitigation: FenceMitigate,
11552}
11553impl FENCE_STATUS_DATA {
11554    pub const ENCODED_LEN: usize = 9usize;
11555    pub const DEFAULT: Self = Self {
11556        breach_time: 0_u32,
11557        breach_count: 0_u16,
11558        breach_status: 0_u8,
11559        breach_type: FenceBreach::DEFAULT,
11560        breach_mitigation: FenceMitigate::DEFAULT,
11561    };
11562    #[cfg(feature = "arbitrary")]
11563    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11564        use arbitrary::{Arbitrary, Unstructured};
11565        let mut buf = [0u8; 1024];
11566        rng.fill_bytes(&mut buf);
11567        let mut unstructured = Unstructured::new(&buf);
11568        Self::arbitrary(&mut unstructured).unwrap_or_default()
11569    }
11570}
11571impl Default for FENCE_STATUS_DATA {
11572    fn default() -> Self {
11573        Self::DEFAULT.clone()
11574    }
11575}
11576impl MessageData for FENCE_STATUS_DATA {
11577    type Message = MavMessage;
11578    const ID: u32 = 162u32;
11579    const NAME: &'static str = "FENCE_STATUS";
11580    const EXTRA_CRC: u8 = 189u8;
11581    const ENCODED_LEN: usize = 9usize;
11582    fn deser(
11583        _version: MavlinkVersion,
11584        __input: &[u8],
11585    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11586        let avail_len = __input.len();
11587        let mut payload_buf = [0; Self::ENCODED_LEN];
11588        let mut buf = if avail_len < Self::ENCODED_LEN {
11589            payload_buf[0..avail_len].copy_from_slice(__input);
11590            Bytes::new(&payload_buf)
11591        } else {
11592            Bytes::new(__input)
11593        };
11594        let mut __struct = Self::default();
11595        __struct.breach_time = buf.get_u32_le()?;
11596        __struct.breach_count = buf.get_u16_le()?;
11597        __struct.breach_status = buf.get_u8()?;
11598        let tmp = buf.get_u8()?;
11599        __struct.breach_type =
11600            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11601                enum_type: "FenceBreach",
11602                value: tmp as u64,
11603            })?;
11604        let tmp = buf.get_u8()?;
11605        __struct.breach_mitigation =
11606            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11607                enum_type: "FenceMitigate",
11608                value: tmp as u64,
11609            })?;
11610        Ok(__struct)
11611    }
11612    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11613        let mut __tmp = BytesMut::new(bytes);
11614        #[allow(clippy::absurd_extreme_comparisons)]
11615        #[allow(unused_comparisons)]
11616        if __tmp.remaining() < Self::ENCODED_LEN {
11617            panic!(
11618                "buffer is too small (need {} bytes, but got {})",
11619                Self::ENCODED_LEN,
11620                __tmp.remaining(),
11621            )
11622        }
11623        __tmp.put_u32_le(self.breach_time);
11624        __tmp.put_u16_le(self.breach_count);
11625        __tmp.put_u8(self.breach_status);
11626        __tmp.put_u8(self.breach_type as u8);
11627        if matches!(version, MavlinkVersion::V2) {
11628            __tmp.put_u8(self.breach_mitigation as u8);
11629            let len = __tmp.len();
11630            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11631        } else {
11632            __tmp.len()
11633        }
11634    }
11635}
11636#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11637#[doc = ""]
11638#[doc = "ID: 110"]
11639#[derive(Debug, Clone, PartialEq)]
11640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11641#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11642#[cfg_attr(feature = "ts", derive(TS))]
11643#[cfg_attr(feature = "ts", ts(export))]
11644pub struct FILE_TRANSFER_PROTOCOL_DATA {
11645    #[doc = "Network ID (0 for broadcast)"]
11646    pub target_network: u8,
11647    #[doc = "System ID (0 for broadcast)"]
11648    pub target_system: u8,
11649    #[doc = "Component ID (0 for broadcast)"]
11650    pub target_component: u8,
11651    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11652    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11653    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11654    pub payload: [u8; 251],
11655}
11656impl FILE_TRANSFER_PROTOCOL_DATA {
11657    pub const ENCODED_LEN: usize = 254usize;
11658    pub const DEFAULT: Self = Self {
11659        target_network: 0_u8,
11660        target_system: 0_u8,
11661        target_component: 0_u8,
11662        payload: [0_u8; 251usize],
11663    };
11664    #[cfg(feature = "arbitrary")]
11665    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11666        use arbitrary::{Arbitrary, Unstructured};
11667        let mut buf = [0u8; 1024];
11668        rng.fill_bytes(&mut buf);
11669        let mut unstructured = Unstructured::new(&buf);
11670        Self::arbitrary(&mut unstructured).unwrap_or_default()
11671    }
11672}
11673impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11674    fn default() -> Self {
11675        Self::DEFAULT.clone()
11676    }
11677}
11678impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11679    type Message = MavMessage;
11680    const ID: u32 = 110u32;
11681    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11682    const EXTRA_CRC: u8 = 84u8;
11683    const ENCODED_LEN: usize = 254usize;
11684    fn deser(
11685        _version: MavlinkVersion,
11686        __input: &[u8],
11687    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11688        let avail_len = __input.len();
11689        let mut payload_buf = [0; Self::ENCODED_LEN];
11690        let mut buf = if avail_len < Self::ENCODED_LEN {
11691            payload_buf[0..avail_len].copy_from_slice(__input);
11692            Bytes::new(&payload_buf)
11693        } else {
11694            Bytes::new(__input)
11695        };
11696        let mut __struct = Self::default();
11697        __struct.target_network = buf.get_u8()?;
11698        __struct.target_system = buf.get_u8()?;
11699        __struct.target_component = buf.get_u8()?;
11700        for v in &mut __struct.payload {
11701            let val = buf.get_u8()?;
11702            *v = val;
11703        }
11704        Ok(__struct)
11705    }
11706    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11707        let mut __tmp = BytesMut::new(bytes);
11708        #[allow(clippy::absurd_extreme_comparisons)]
11709        #[allow(unused_comparisons)]
11710        if __tmp.remaining() < Self::ENCODED_LEN {
11711            panic!(
11712                "buffer is too small (need {} bytes, but got {})",
11713                Self::ENCODED_LEN,
11714                __tmp.remaining(),
11715            )
11716        }
11717        __tmp.put_u8(self.target_network);
11718        __tmp.put_u8(self.target_system);
11719        __tmp.put_u8(self.target_component);
11720        for val in &self.payload {
11721            __tmp.put_u8(*val);
11722        }
11723        if matches!(version, MavlinkVersion::V2) {
11724            let len = __tmp.len();
11725            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11726        } else {
11727            __tmp.len()
11728        }
11729    }
11730}
11731#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11732#[doc = ""]
11733#[doc = "ID: 264"]
11734#[derive(Debug, Clone, PartialEq)]
11735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11737#[cfg_attr(feature = "ts", derive(TS))]
11738#[cfg_attr(feature = "ts", ts(export))]
11739pub struct FLIGHT_INFORMATION_DATA {
11740    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11741    pub arming_time_utc: u64,
11742    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11743    pub takeoff_time_utc: u64,
11744    #[doc = "Flight number. Note, field is misnamed UUID."]
11745    pub flight_uuid: u64,
11746    #[doc = "Timestamp (time since system boot)."]
11747    pub time_boot_ms: u32,
11748    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11749    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11750    pub landing_time: u32,
11751}
11752impl FLIGHT_INFORMATION_DATA {
11753    pub const ENCODED_LEN: usize = 32usize;
11754    pub const DEFAULT: Self = Self {
11755        arming_time_utc: 0_u64,
11756        takeoff_time_utc: 0_u64,
11757        flight_uuid: 0_u64,
11758        time_boot_ms: 0_u32,
11759        landing_time: 0_u32,
11760    };
11761    #[cfg(feature = "arbitrary")]
11762    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11763        use arbitrary::{Arbitrary, Unstructured};
11764        let mut buf = [0u8; 1024];
11765        rng.fill_bytes(&mut buf);
11766        let mut unstructured = Unstructured::new(&buf);
11767        Self::arbitrary(&mut unstructured).unwrap_or_default()
11768    }
11769}
11770impl Default for FLIGHT_INFORMATION_DATA {
11771    fn default() -> Self {
11772        Self::DEFAULT.clone()
11773    }
11774}
11775impl MessageData for FLIGHT_INFORMATION_DATA {
11776    type Message = MavMessage;
11777    const ID: u32 = 264u32;
11778    const NAME: &'static str = "FLIGHT_INFORMATION";
11779    const EXTRA_CRC: u8 = 49u8;
11780    const ENCODED_LEN: usize = 32usize;
11781    fn deser(
11782        _version: MavlinkVersion,
11783        __input: &[u8],
11784    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11785        let avail_len = __input.len();
11786        let mut payload_buf = [0; Self::ENCODED_LEN];
11787        let mut buf = if avail_len < Self::ENCODED_LEN {
11788            payload_buf[0..avail_len].copy_from_slice(__input);
11789            Bytes::new(&payload_buf)
11790        } else {
11791            Bytes::new(__input)
11792        };
11793        let mut __struct = Self::default();
11794        __struct.arming_time_utc = buf.get_u64_le()?;
11795        __struct.takeoff_time_utc = buf.get_u64_le()?;
11796        __struct.flight_uuid = buf.get_u64_le()?;
11797        __struct.time_boot_ms = buf.get_u32_le()?;
11798        __struct.landing_time = buf.get_u32_le()?;
11799        Ok(__struct)
11800    }
11801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11802        let mut __tmp = BytesMut::new(bytes);
11803        #[allow(clippy::absurd_extreme_comparisons)]
11804        #[allow(unused_comparisons)]
11805        if __tmp.remaining() < Self::ENCODED_LEN {
11806            panic!(
11807                "buffer is too small (need {} bytes, but got {})",
11808                Self::ENCODED_LEN,
11809                __tmp.remaining(),
11810            )
11811        }
11812        __tmp.put_u64_le(self.arming_time_utc);
11813        __tmp.put_u64_le(self.takeoff_time_utc);
11814        __tmp.put_u64_le(self.flight_uuid);
11815        __tmp.put_u32_le(self.time_boot_ms);
11816        if matches!(version, MavlinkVersion::V2) {
11817            __tmp.put_u32_le(self.landing_time);
11818            let len = __tmp.len();
11819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11820        } else {
11821            __tmp.len()
11822        }
11823    }
11824}
11825#[doc = "Current motion information from a designated system."]
11826#[doc = ""]
11827#[doc = "ID: 144"]
11828#[derive(Debug, Clone, PartialEq)]
11829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11831#[cfg_attr(feature = "ts", derive(TS))]
11832#[cfg_attr(feature = "ts", ts(export))]
11833pub struct FOLLOW_TARGET_DATA {
11834    #[doc = "Timestamp (time since system boot)."]
11835    pub timestamp: u64,
11836    #[doc = "button states or switches of a tracker device"]
11837    pub custom_state: u64,
11838    #[doc = "Latitude (WGS84)"]
11839    pub lat: i32,
11840    #[doc = "Longitude (WGS84)"]
11841    pub lon: i32,
11842    #[doc = "Altitude (MSL)"]
11843    pub alt: f32,
11844    #[doc = "target velocity (0,0,0) for unknown"]
11845    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11846    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11847    pub vel: [f32; 3],
11848    #[doc = "linear target acceleration (0,0,0) for unknown"]
11849    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11850    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11851    pub acc: [f32; 3],
11852    #[doc = "(0 0 0 0 for unknown)"]
11853    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11854    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11855    pub attitude_q: [f32; 4],
11856    #[doc = "(0 0 0 for unknown)"]
11857    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11858    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11859    pub rates: [f32; 3],
11860    #[doc = "eph epv"]
11861    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11862    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11863    pub position_cov: [f32; 3],
11864    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
11865    pub est_capabilities: u8,
11866}
11867impl FOLLOW_TARGET_DATA {
11868    pub const ENCODED_LEN: usize = 93usize;
11869    pub const DEFAULT: Self = Self {
11870        timestamp: 0_u64,
11871        custom_state: 0_u64,
11872        lat: 0_i32,
11873        lon: 0_i32,
11874        alt: 0.0_f32,
11875        vel: [0.0_f32; 3usize],
11876        acc: [0.0_f32; 3usize],
11877        attitude_q: [0.0_f32; 4usize],
11878        rates: [0.0_f32; 3usize],
11879        position_cov: [0.0_f32; 3usize],
11880        est_capabilities: 0_u8,
11881    };
11882    #[cfg(feature = "arbitrary")]
11883    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11884        use arbitrary::{Arbitrary, Unstructured};
11885        let mut buf = [0u8; 1024];
11886        rng.fill_bytes(&mut buf);
11887        let mut unstructured = Unstructured::new(&buf);
11888        Self::arbitrary(&mut unstructured).unwrap_or_default()
11889    }
11890}
11891impl Default for FOLLOW_TARGET_DATA {
11892    fn default() -> Self {
11893        Self::DEFAULT.clone()
11894    }
11895}
11896impl MessageData for FOLLOW_TARGET_DATA {
11897    type Message = MavMessage;
11898    const ID: u32 = 144u32;
11899    const NAME: &'static str = "FOLLOW_TARGET";
11900    const EXTRA_CRC: u8 = 127u8;
11901    const ENCODED_LEN: usize = 93usize;
11902    fn deser(
11903        _version: MavlinkVersion,
11904        __input: &[u8],
11905    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11906        let avail_len = __input.len();
11907        let mut payload_buf = [0; Self::ENCODED_LEN];
11908        let mut buf = if avail_len < Self::ENCODED_LEN {
11909            payload_buf[0..avail_len].copy_from_slice(__input);
11910            Bytes::new(&payload_buf)
11911        } else {
11912            Bytes::new(__input)
11913        };
11914        let mut __struct = Self::default();
11915        __struct.timestamp = buf.get_u64_le()?;
11916        __struct.custom_state = buf.get_u64_le()?;
11917        __struct.lat = buf.get_i32_le()?;
11918        __struct.lon = buf.get_i32_le()?;
11919        __struct.alt = buf.get_f32_le()?;
11920        for v in &mut __struct.vel {
11921            let val = buf.get_f32_le()?;
11922            *v = val;
11923        }
11924        for v in &mut __struct.acc {
11925            let val = buf.get_f32_le()?;
11926            *v = val;
11927        }
11928        for v in &mut __struct.attitude_q {
11929            let val = buf.get_f32_le()?;
11930            *v = val;
11931        }
11932        for v in &mut __struct.rates {
11933            let val = buf.get_f32_le()?;
11934            *v = val;
11935        }
11936        for v in &mut __struct.position_cov {
11937            let val = buf.get_f32_le()?;
11938            *v = val;
11939        }
11940        __struct.est_capabilities = buf.get_u8()?;
11941        Ok(__struct)
11942    }
11943    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11944        let mut __tmp = BytesMut::new(bytes);
11945        #[allow(clippy::absurd_extreme_comparisons)]
11946        #[allow(unused_comparisons)]
11947        if __tmp.remaining() < Self::ENCODED_LEN {
11948            panic!(
11949                "buffer is too small (need {} bytes, but got {})",
11950                Self::ENCODED_LEN,
11951                __tmp.remaining(),
11952            )
11953        }
11954        __tmp.put_u64_le(self.timestamp);
11955        __tmp.put_u64_le(self.custom_state);
11956        __tmp.put_i32_le(self.lat);
11957        __tmp.put_i32_le(self.lon);
11958        __tmp.put_f32_le(self.alt);
11959        for val in &self.vel {
11960            __tmp.put_f32_le(*val);
11961        }
11962        for val in &self.acc {
11963            __tmp.put_f32_le(*val);
11964        }
11965        for val in &self.attitude_q {
11966            __tmp.put_f32_le(*val);
11967        }
11968        for val in &self.rates {
11969            __tmp.put_f32_le(*val);
11970        }
11971        for val in &self.position_cov {
11972            __tmp.put_f32_le(*val);
11973        }
11974        __tmp.put_u8(self.est_capabilities);
11975        if matches!(version, MavlinkVersion::V2) {
11976            let len = __tmp.len();
11977            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11978        } else {
11979            __tmp.len()
11980        }
11981    }
11982}
11983#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
11984#[doc = ""]
11985#[doc = "ID: 371"]
11986#[derive(Debug, Clone, PartialEq)]
11987#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11989#[cfg_attr(feature = "ts", derive(TS))]
11990#[cfg_attr(feature = "ts", ts(export))]
11991pub struct FUEL_STATUS_DATA {
11992    #[doc = "Capacity when full. Must be provided."]
11993    pub maximum_fuel: f32,
11994    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11995    pub consumed_fuel: f32,
11996    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11997    pub remaining_fuel: f32,
11998    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
11999    pub flow_rate: f32,
12000    #[doc = "Fuel temperature. NaN: field not provided."]
12001    pub temperature: f32,
12002    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12003    pub fuel_type: MavFuelType,
12004    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12005    pub id: u8,
12006    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12007    pub percent_remaining: u8,
12008}
12009impl FUEL_STATUS_DATA {
12010    pub const ENCODED_LEN: usize = 26usize;
12011    pub const DEFAULT: Self = Self {
12012        maximum_fuel: 0.0_f32,
12013        consumed_fuel: 0.0_f32,
12014        remaining_fuel: 0.0_f32,
12015        flow_rate: 0.0_f32,
12016        temperature: 0.0_f32,
12017        fuel_type: MavFuelType::DEFAULT,
12018        id: 0_u8,
12019        percent_remaining: 0_u8,
12020    };
12021    #[cfg(feature = "arbitrary")]
12022    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12023        use arbitrary::{Arbitrary, Unstructured};
12024        let mut buf = [0u8; 1024];
12025        rng.fill_bytes(&mut buf);
12026        let mut unstructured = Unstructured::new(&buf);
12027        Self::arbitrary(&mut unstructured).unwrap_or_default()
12028    }
12029}
12030impl Default for FUEL_STATUS_DATA {
12031    fn default() -> Self {
12032        Self::DEFAULT.clone()
12033    }
12034}
12035impl MessageData for FUEL_STATUS_DATA {
12036    type Message = MavMessage;
12037    const ID: u32 = 371u32;
12038    const NAME: &'static str = "FUEL_STATUS";
12039    const EXTRA_CRC: u8 = 10u8;
12040    const ENCODED_LEN: usize = 26usize;
12041    fn deser(
12042        _version: MavlinkVersion,
12043        __input: &[u8],
12044    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12045        let avail_len = __input.len();
12046        let mut payload_buf = [0; Self::ENCODED_LEN];
12047        let mut buf = if avail_len < Self::ENCODED_LEN {
12048            payload_buf[0..avail_len].copy_from_slice(__input);
12049            Bytes::new(&payload_buf)
12050        } else {
12051            Bytes::new(__input)
12052        };
12053        let mut __struct = Self::default();
12054        __struct.maximum_fuel = buf.get_f32_le()?;
12055        __struct.consumed_fuel = buf.get_f32_le()?;
12056        __struct.remaining_fuel = buf.get_f32_le()?;
12057        __struct.flow_rate = buf.get_f32_le()?;
12058        __struct.temperature = buf.get_f32_le()?;
12059        let tmp = buf.get_u32_le()?;
12060        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12061            ::mavlink_core::error::ParserError::InvalidEnum {
12062                enum_type: "MavFuelType",
12063                value: tmp as u64,
12064            },
12065        )?;
12066        __struct.id = buf.get_u8()?;
12067        __struct.percent_remaining = buf.get_u8()?;
12068        Ok(__struct)
12069    }
12070    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12071        let mut __tmp = BytesMut::new(bytes);
12072        #[allow(clippy::absurd_extreme_comparisons)]
12073        #[allow(unused_comparisons)]
12074        if __tmp.remaining() < Self::ENCODED_LEN {
12075            panic!(
12076                "buffer is too small (need {} bytes, but got {})",
12077                Self::ENCODED_LEN,
12078                __tmp.remaining(),
12079            )
12080        }
12081        __tmp.put_f32_le(self.maximum_fuel);
12082        __tmp.put_f32_le(self.consumed_fuel);
12083        __tmp.put_f32_le(self.remaining_fuel);
12084        __tmp.put_f32_le(self.flow_rate);
12085        __tmp.put_f32_le(self.temperature);
12086        __tmp.put_u32_le(self.fuel_type as u32);
12087        __tmp.put_u8(self.id);
12088        __tmp.put_u8(self.percent_remaining);
12089        if matches!(version, MavlinkVersion::V2) {
12090            let len = __tmp.len();
12091            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12092        } else {
12093            __tmp.len()
12094        }
12095    }
12096}
12097#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12098#[doc = ""]
12099#[doc = "ID: 373"]
12100#[derive(Debug, Clone, PartialEq)]
12101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12103#[cfg_attr(feature = "ts", derive(TS))]
12104#[cfg_attr(feature = "ts", ts(export))]
12105pub struct GENERATOR_STATUS_DATA {
12106    #[doc = "Status flags."]
12107    pub status: MavGeneratorStatusFlag,
12108    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12109    pub battery_current: f32,
12110    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12111    pub load_current: f32,
12112    #[doc = "The power being generated. NaN: field not provided"]
12113    pub power_generated: f32,
12114    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12115    pub bus_voltage: f32,
12116    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12117    pub bat_current_setpoint: f32,
12118    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12119    pub runtime: u32,
12120    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12121    pub time_until_maintenance: i32,
12122    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12123    pub generator_speed: u16,
12124    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12125    pub rectifier_temperature: i16,
12126    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12127    pub generator_temperature: i16,
12128}
12129impl GENERATOR_STATUS_DATA {
12130    pub const ENCODED_LEN: usize = 42usize;
12131    pub const DEFAULT: Self = Self {
12132        status: MavGeneratorStatusFlag::DEFAULT,
12133        battery_current: 0.0_f32,
12134        load_current: 0.0_f32,
12135        power_generated: 0.0_f32,
12136        bus_voltage: 0.0_f32,
12137        bat_current_setpoint: 0.0_f32,
12138        runtime: 0_u32,
12139        time_until_maintenance: 0_i32,
12140        generator_speed: 0_u16,
12141        rectifier_temperature: 0_i16,
12142        generator_temperature: 0_i16,
12143    };
12144    #[cfg(feature = "arbitrary")]
12145    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12146        use arbitrary::{Arbitrary, Unstructured};
12147        let mut buf = [0u8; 1024];
12148        rng.fill_bytes(&mut buf);
12149        let mut unstructured = Unstructured::new(&buf);
12150        Self::arbitrary(&mut unstructured).unwrap_or_default()
12151    }
12152}
12153impl Default for GENERATOR_STATUS_DATA {
12154    fn default() -> Self {
12155        Self::DEFAULT.clone()
12156    }
12157}
12158impl MessageData for GENERATOR_STATUS_DATA {
12159    type Message = MavMessage;
12160    const ID: u32 = 373u32;
12161    const NAME: &'static str = "GENERATOR_STATUS";
12162    const EXTRA_CRC: u8 = 117u8;
12163    const ENCODED_LEN: usize = 42usize;
12164    fn deser(
12165        _version: MavlinkVersion,
12166        __input: &[u8],
12167    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12168        let avail_len = __input.len();
12169        let mut payload_buf = [0; Self::ENCODED_LEN];
12170        let mut buf = if avail_len < Self::ENCODED_LEN {
12171            payload_buf[0..avail_len].copy_from_slice(__input);
12172            Bytes::new(&payload_buf)
12173        } else {
12174            Bytes::new(__input)
12175        };
12176        let mut __struct = Self::default();
12177        let tmp = buf.get_u64_le()?;
12178        __struct.status =
12179            MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
12180                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12181                    flag_type: "MavGeneratorStatusFlag",
12182                    value: tmp as u64,
12183                })?;
12184        __struct.battery_current = buf.get_f32_le()?;
12185        __struct.load_current = buf.get_f32_le()?;
12186        __struct.power_generated = buf.get_f32_le()?;
12187        __struct.bus_voltage = buf.get_f32_le()?;
12188        __struct.bat_current_setpoint = buf.get_f32_le()?;
12189        __struct.runtime = buf.get_u32_le()?;
12190        __struct.time_until_maintenance = buf.get_i32_le()?;
12191        __struct.generator_speed = buf.get_u16_le()?;
12192        __struct.rectifier_temperature = buf.get_i16_le()?;
12193        __struct.generator_temperature = buf.get_i16_le()?;
12194        Ok(__struct)
12195    }
12196    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12197        let mut __tmp = BytesMut::new(bytes);
12198        #[allow(clippy::absurd_extreme_comparisons)]
12199        #[allow(unused_comparisons)]
12200        if __tmp.remaining() < Self::ENCODED_LEN {
12201            panic!(
12202                "buffer is too small (need {} bytes, but got {})",
12203                Self::ENCODED_LEN,
12204                __tmp.remaining(),
12205            )
12206        }
12207        __tmp.put_u64_le(self.status.bits() as u64);
12208        __tmp.put_f32_le(self.battery_current);
12209        __tmp.put_f32_le(self.load_current);
12210        __tmp.put_f32_le(self.power_generated);
12211        __tmp.put_f32_le(self.bus_voltage);
12212        __tmp.put_f32_le(self.bat_current_setpoint);
12213        __tmp.put_u32_le(self.runtime);
12214        __tmp.put_i32_le(self.time_until_maintenance);
12215        __tmp.put_u16_le(self.generator_speed);
12216        __tmp.put_i16_le(self.rectifier_temperature);
12217        __tmp.put_i16_le(self.generator_temperature);
12218        if matches!(version, MavlinkVersion::V2) {
12219            let len = __tmp.len();
12220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12221        } else {
12222            __tmp.len()
12223        }
12224    }
12225}
12226#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12227#[doc = ""]
12228#[doc = "ID: 285"]
12229#[derive(Debug, Clone, PartialEq)]
12230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12232#[cfg_attr(feature = "ts", derive(TS))]
12233#[cfg_attr(feature = "ts", ts(export))]
12234pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12235    #[doc = "Timestamp (time since system boot)."]
12236    pub time_boot_ms: u32,
12237    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12238    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12239    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12240    pub q: [f32; 4],
12241    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12242    pub angular_velocity_x: f32,
12243    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12244    pub angular_velocity_y: f32,
12245    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12246    pub angular_velocity_z: f32,
12247    #[doc = "Failure flags (0 for no failure)"]
12248    pub failure_flags: GimbalDeviceErrorFlags,
12249    #[doc = "Current gimbal flags set."]
12250    pub flags: GimbalDeviceFlags,
12251    #[doc = "System ID"]
12252    pub target_system: u8,
12253    #[doc = "Component ID"]
12254    pub target_component: u8,
12255    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12256    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12257    pub delta_yaw: f32,
12258    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12259    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12260    pub delta_yaw_velocity: f32,
12261    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12262    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12263    pub gimbal_device_id: u8,
12264}
12265impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12266    pub const ENCODED_LEN: usize = 49usize;
12267    pub const DEFAULT: Self = Self {
12268        time_boot_ms: 0_u32,
12269        q: [0.0_f32; 4usize],
12270        angular_velocity_x: 0.0_f32,
12271        angular_velocity_y: 0.0_f32,
12272        angular_velocity_z: 0.0_f32,
12273        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12274        flags: GimbalDeviceFlags::DEFAULT,
12275        target_system: 0_u8,
12276        target_component: 0_u8,
12277        delta_yaw: 0.0_f32,
12278        delta_yaw_velocity: 0.0_f32,
12279        gimbal_device_id: 0_u8,
12280    };
12281    #[cfg(feature = "arbitrary")]
12282    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12283        use arbitrary::{Arbitrary, Unstructured};
12284        let mut buf = [0u8; 1024];
12285        rng.fill_bytes(&mut buf);
12286        let mut unstructured = Unstructured::new(&buf);
12287        Self::arbitrary(&mut unstructured).unwrap_or_default()
12288    }
12289}
12290impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12291    fn default() -> Self {
12292        Self::DEFAULT.clone()
12293    }
12294}
12295impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12296    type Message = MavMessage;
12297    const ID: u32 = 285u32;
12298    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12299    const EXTRA_CRC: u8 = 137u8;
12300    const ENCODED_LEN: usize = 49usize;
12301    fn deser(
12302        _version: MavlinkVersion,
12303        __input: &[u8],
12304    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12305        let avail_len = __input.len();
12306        let mut payload_buf = [0; Self::ENCODED_LEN];
12307        let mut buf = if avail_len < Self::ENCODED_LEN {
12308            payload_buf[0..avail_len].copy_from_slice(__input);
12309            Bytes::new(&payload_buf)
12310        } else {
12311            Bytes::new(__input)
12312        };
12313        let mut __struct = Self::default();
12314        __struct.time_boot_ms = buf.get_u32_le()?;
12315        for v in &mut __struct.q {
12316            let val = buf.get_f32_le()?;
12317            *v = val;
12318        }
12319        __struct.angular_velocity_x = buf.get_f32_le()?;
12320        __struct.angular_velocity_y = buf.get_f32_le()?;
12321        __struct.angular_velocity_z = buf.get_f32_le()?;
12322        let tmp = buf.get_u32_le()?;
12323        __struct.failure_flags =
12324            GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
12325                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12326                    flag_type: "GimbalDeviceErrorFlags",
12327                    value: tmp as u64,
12328                })?;
12329        let tmp = buf.get_u16_le()?;
12330        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12331            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12332                flag_type: "GimbalDeviceFlags",
12333                value: tmp as u64,
12334            })?;
12335        __struct.target_system = buf.get_u8()?;
12336        __struct.target_component = buf.get_u8()?;
12337        __struct.delta_yaw = buf.get_f32_le()?;
12338        __struct.delta_yaw_velocity = buf.get_f32_le()?;
12339        __struct.gimbal_device_id = buf.get_u8()?;
12340        Ok(__struct)
12341    }
12342    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12343        let mut __tmp = BytesMut::new(bytes);
12344        #[allow(clippy::absurd_extreme_comparisons)]
12345        #[allow(unused_comparisons)]
12346        if __tmp.remaining() < Self::ENCODED_LEN {
12347            panic!(
12348                "buffer is too small (need {} bytes, but got {})",
12349                Self::ENCODED_LEN,
12350                __tmp.remaining(),
12351            )
12352        }
12353        __tmp.put_u32_le(self.time_boot_ms);
12354        for val in &self.q {
12355            __tmp.put_f32_le(*val);
12356        }
12357        __tmp.put_f32_le(self.angular_velocity_x);
12358        __tmp.put_f32_le(self.angular_velocity_y);
12359        __tmp.put_f32_le(self.angular_velocity_z);
12360        __tmp.put_u32_le(self.failure_flags.bits() as u32);
12361        __tmp.put_u16_le(self.flags.bits() as u16);
12362        __tmp.put_u8(self.target_system);
12363        __tmp.put_u8(self.target_component);
12364        if matches!(version, MavlinkVersion::V2) {
12365            __tmp.put_f32_le(self.delta_yaw);
12366            __tmp.put_f32_le(self.delta_yaw_velocity);
12367            __tmp.put_u8(self.gimbal_device_id);
12368            let len = __tmp.len();
12369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12370        } else {
12371            __tmp.len()
12372        }
12373    }
12374}
12375#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12376#[doc = ""]
12377#[doc = "ID: 283"]
12378#[derive(Debug, Clone, PartialEq)]
12379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12381#[cfg_attr(feature = "ts", derive(TS))]
12382#[cfg_attr(feature = "ts", ts(export))]
12383pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12384    #[doc = "UID of gimbal hardware (0 if unknown)."]
12385    pub uid: u64,
12386    #[doc = "Timestamp (time since system boot)."]
12387    pub time_boot_ms: u32,
12388    #[doc = "0xff)."]
12389    pub firmware_version: u32,
12390    #[doc = "0xff)."]
12391    pub hardware_version: u32,
12392    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12393    pub roll_min: f32,
12394    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12395    pub roll_max: f32,
12396    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12397    pub pitch_min: f32,
12398    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12399    pub pitch_max: f32,
12400    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12401    pub yaw_min: f32,
12402    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12403    pub yaw_max: f32,
12404    #[doc = "Bitmap of gimbal capability flags."]
12405    pub cap_flags: GimbalDeviceCapFlags,
12406    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12407    pub custom_cap_flags: u16,
12408    #[doc = "Name of the gimbal vendor."]
12409    #[cfg_attr(feature = "ts", ts(type = "string"))]
12410    pub vendor_name: CharArray<32>,
12411    #[doc = "Name of the gimbal model."]
12412    #[cfg_attr(feature = "ts", ts(type = "string"))]
12413    pub model_name: CharArray<32>,
12414    #[doc = "Custom name of the gimbal given to it by the user."]
12415    #[cfg_attr(feature = "ts", ts(type = "string"))]
12416    pub custom_name: CharArray<32>,
12417    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12418    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12419    pub gimbal_device_id: u8,
12420}
12421impl GIMBAL_DEVICE_INFORMATION_DATA {
12422    pub const ENCODED_LEN: usize = 145usize;
12423    pub const DEFAULT: Self = Self {
12424        uid: 0_u64,
12425        time_boot_ms: 0_u32,
12426        firmware_version: 0_u32,
12427        hardware_version: 0_u32,
12428        roll_min: 0.0_f32,
12429        roll_max: 0.0_f32,
12430        pitch_min: 0.0_f32,
12431        pitch_max: 0.0_f32,
12432        yaw_min: 0.0_f32,
12433        yaw_max: 0.0_f32,
12434        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12435        custom_cap_flags: 0_u16,
12436        vendor_name: CharArray::new([0_u8; 32usize]),
12437        model_name: CharArray::new([0_u8; 32usize]),
12438        custom_name: CharArray::new([0_u8; 32usize]),
12439        gimbal_device_id: 0_u8,
12440    };
12441    #[cfg(feature = "arbitrary")]
12442    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12443        use arbitrary::{Arbitrary, Unstructured};
12444        let mut buf = [0u8; 1024];
12445        rng.fill_bytes(&mut buf);
12446        let mut unstructured = Unstructured::new(&buf);
12447        Self::arbitrary(&mut unstructured).unwrap_or_default()
12448    }
12449}
12450impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12451    fn default() -> Self {
12452        Self::DEFAULT.clone()
12453    }
12454}
12455impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12456    type Message = MavMessage;
12457    const ID: u32 = 283u32;
12458    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12459    const EXTRA_CRC: u8 = 74u8;
12460    const ENCODED_LEN: usize = 145usize;
12461    fn deser(
12462        _version: MavlinkVersion,
12463        __input: &[u8],
12464    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12465        let avail_len = __input.len();
12466        let mut payload_buf = [0; Self::ENCODED_LEN];
12467        let mut buf = if avail_len < Self::ENCODED_LEN {
12468            payload_buf[0..avail_len].copy_from_slice(__input);
12469            Bytes::new(&payload_buf)
12470        } else {
12471            Bytes::new(__input)
12472        };
12473        let mut __struct = Self::default();
12474        __struct.uid = buf.get_u64_le()?;
12475        __struct.time_boot_ms = buf.get_u32_le()?;
12476        __struct.firmware_version = buf.get_u32_le()?;
12477        __struct.hardware_version = buf.get_u32_le()?;
12478        __struct.roll_min = buf.get_f32_le()?;
12479        __struct.roll_max = buf.get_f32_le()?;
12480        __struct.pitch_min = buf.get_f32_le()?;
12481        __struct.pitch_max = buf.get_f32_le()?;
12482        __struct.yaw_min = buf.get_f32_le()?;
12483        __struct.yaw_max = buf.get_f32_le()?;
12484        let tmp = buf.get_u16_le()?;
12485        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12486            tmp as <GimbalDeviceCapFlags as Flags>::Bits,
12487        )
12488        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12489            flag_type: "GimbalDeviceCapFlags",
12490            value: tmp as u64,
12491        })?;
12492        __struct.custom_cap_flags = buf.get_u16_le()?;
12493        let mut tmp = [0_u8; 32usize];
12494        for v in &mut tmp {
12495            *v = buf.get_u8()?;
12496        }
12497        __struct.vendor_name = CharArray::new(tmp);
12498        let mut tmp = [0_u8; 32usize];
12499        for v in &mut tmp {
12500            *v = buf.get_u8()?;
12501        }
12502        __struct.model_name = CharArray::new(tmp);
12503        let mut tmp = [0_u8; 32usize];
12504        for v in &mut tmp {
12505            *v = buf.get_u8()?;
12506        }
12507        __struct.custom_name = CharArray::new(tmp);
12508        __struct.gimbal_device_id = buf.get_u8()?;
12509        Ok(__struct)
12510    }
12511    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12512        let mut __tmp = BytesMut::new(bytes);
12513        #[allow(clippy::absurd_extreme_comparisons)]
12514        #[allow(unused_comparisons)]
12515        if __tmp.remaining() < Self::ENCODED_LEN {
12516            panic!(
12517                "buffer is too small (need {} bytes, but got {})",
12518                Self::ENCODED_LEN,
12519                __tmp.remaining(),
12520            )
12521        }
12522        __tmp.put_u64_le(self.uid);
12523        __tmp.put_u32_le(self.time_boot_ms);
12524        __tmp.put_u32_le(self.firmware_version);
12525        __tmp.put_u32_le(self.hardware_version);
12526        __tmp.put_f32_le(self.roll_min);
12527        __tmp.put_f32_le(self.roll_max);
12528        __tmp.put_f32_le(self.pitch_min);
12529        __tmp.put_f32_le(self.pitch_max);
12530        __tmp.put_f32_le(self.yaw_min);
12531        __tmp.put_f32_le(self.yaw_max);
12532        __tmp.put_u16_le(self.cap_flags.bits() as u16);
12533        __tmp.put_u16_le(self.custom_cap_flags);
12534        for val in &self.vendor_name {
12535            __tmp.put_u8(*val);
12536        }
12537        for val in &self.model_name {
12538            __tmp.put_u8(*val);
12539        }
12540        for val in &self.custom_name {
12541            __tmp.put_u8(*val);
12542        }
12543        if matches!(version, MavlinkVersion::V2) {
12544            __tmp.put_u8(self.gimbal_device_id);
12545            let len = __tmp.len();
12546            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12547        } else {
12548            __tmp.len()
12549        }
12550    }
12551}
12552#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12553#[doc = ""]
12554#[doc = "ID: 284"]
12555#[derive(Debug, Clone, PartialEq)]
12556#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12557#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12558#[cfg_attr(feature = "ts", derive(TS))]
12559#[cfg_attr(feature = "ts", ts(export))]
12560pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12561    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12562    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12563    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12564    pub q: [f32; 4],
12565    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12566    pub angular_velocity_x: f32,
12567    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12568    pub angular_velocity_y: f32,
12569    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12570    pub angular_velocity_z: f32,
12571    #[doc = "Low level gimbal flags."]
12572    pub flags: GimbalDeviceFlags,
12573    #[doc = "System ID"]
12574    pub target_system: u8,
12575    #[doc = "Component ID"]
12576    pub target_component: u8,
12577}
12578impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12579    pub const ENCODED_LEN: usize = 32usize;
12580    pub const DEFAULT: Self = Self {
12581        q: [0.0_f32; 4usize],
12582        angular_velocity_x: 0.0_f32,
12583        angular_velocity_y: 0.0_f32,
12584        angular_velocity_z: 0.0_f32,
12585        flags: GimbalDeviceFlags::DEFAULT,
12586        target_system: 0_u8,
12587        target_component: 0_u8,
12588    };
12589    #[cfg(feature = "arbitrary")]
12590    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12591        use arbitrary::{Arbitrary, Unstructured};
12592        let mut buf = [0u8; 1024];
12593        rng.fill_bytes(&mut buf);
12594        let mut unstructured = Unstructured::new(&buf);
12595        Self::arbitrary(&mut unstructured).unwrap_or_default()
12596    }
12597}
12598impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12599    fn default() -> Self {
12600        Self::DEFAULT.clone()
12601    }
12602}
12603impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12604    type Message = MavMessage;
12605    const ID: u32 = 284u32;
12606    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12607    const EXTRA_CRC: u8 = 99u8;
12608    const ENCODED_LEN: usize = 32usize;
12609    fn deser(
12610        _version: MavlinkVersion,
12611        __input: &[u8],
12612    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12613        let avail_len = __input.len();
12614        let mut payload_buf = [0; Self::ENCODED_LEN];
12615        let mut buf = if avail_len < Self::ENCODED_LEN {
12616            payload_buf[0..avail_len].copy_from_slice(__input);
12617            Bytes::new(&payload_buf)
12618        } else {
12619            Bytes::new(__input)
12620        };
12621        let mut __struct = Self::default();
12622        for v in &mut __struct.q {
12623            let val = buf.get_f32_le()?;
12624            *v = val;
12625        }
12626        __struct.angular_velocity_x = buf.get_f32_le()?;
12627        __struct.angular_velocity_y = buf.get_f32_le()?;
12628        __struct.angular_velocity_z = buf.get_f32_le()?;
12629        let tmp = buf.get_u16_le()?;
12630        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12631            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12632                flag_type: "GimbalDeviceFlags",
12633                value: tmp as u64,
12634            })?;
12635        __struct.target_system = buf.get_u8()?;
12636        __struct.target_component = buf.get_u8()?;
12637        Ok(__struct)
12638    }
12639    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12640        let mut __tmp = BytesMut::new(bytes);
12641        #[allow(clippy::absurd_extreme_comparisons)]
12642        #[allow(unused_comparisons)]
12643        if __tmp.remaining() < Self::ENCODED_LEN {
12644            panic!(
12645                "buffer is too small (need {} bytes, but got {})",
12646                Self::ENCODED_LEN,
12647                __tmp.remaining(),
12648            )
12649        }
12650        for val in &self.q {
12651            __tmp.put_f32_le(*val);
12652        }
12653        __tmp.put_f32_le(self.angular_velocity_x);
12654        __tmp.put_f32_le(self.angular_velocity_y);
12655        __tmp.put_f32_le(self.angular_velocity_z);
12656        __tmp.put_u16_le(self.flags.bits() as u16);
12657        __tmp.put_u8(self.target_system);
12658        __tmp.put_u8(self.target_component);
12659        if matches!(version, MavlinkVersion::V2) {
12660            let len = __tmp.len();
12661            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12662        } else {
12663            __tmp.len()
12664        }
12665    }
12666}
12667#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12668#[doc = ""]
12669#[doc = "ID: 280"]
12670#[derive(Debug, Clone, PartialEq)]
12671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12672#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12673#[cfg_attr(feature = "ts", derive(TS))]
12674#[cfg_attr(feature = "ts", ts(export))]
12675pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12676    #[doc = "Timestamp (time since system boot)."]
12677    pub time_boot_ms: u32,
12678    #[doc = "Bitmap of gimbal capability flags."]
12679    pub cap_flags: GimbalManagerCapFlags,
12680    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12681    pub roll_min: f32,
12682    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12683    pub roll_max: f32,
12684    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12685    pub pitch_min: f32,
12686    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12687    pub pitch_max: f32,
12688    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12689    pub yaw_min: f32,
12690    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12691    pub yaw_max: f32,
12692    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12693    pub gimbal_device_id: u8,
12694}
12695impl GIMBAL_MANAGER_INFORMATION_DATA {
12696    pub const ENCODED_LEN: usize = 33usize;
12697    pub const DEFAULT: Self = Self {
12698        time_boot_ms: 0_u32,
12699        cap_flags: GimbalManagerCapFlags::DEFAULT,
12700        roll_min: 0.0_f32,
12701        roll_max: 0.0_f32,
12702        pitch_min: 0.0_f32,
12703        pitch_max: 0.0_f32,
12704        yaw_min: 0.0_f32,
12705        yaw_max: 0.0_f32,
12706        gimbal_device_id: 0_u8,
12707    };
12708    #[cfg(feature = "arbitrary")]
12709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12710        use arbitrary::{Arbitrary, Unstructured};
12711        let mut buf = [0u8; 1024];
12712        rng.fill_bytes(&mut buf);
12713        let mut unstructured = Unstructured::new(&buf);
12714        Self::arbitrary(&mut unstructured).unwrap_or_default()
12715    }
12716}
12717impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12718    fn default() -> Self {
12719        Self::DEFAULT.clone()
12720    }
12721}
12722impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12723    type Message = MavMessage;
12724    const ID: u32 = 280u32;
12725    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12726    const EXTRA_CRC: u8 = 70u8;
12727    const ENCODED_LEN: usize = 33usize;
12728    fn deser(
12729        _version: MavlinkVersion,
12730        __input: &[u8],
12731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12732        let avail_len = __input.len();
12733        let mut payload_buf = [0; Self::ENCODED_LEN];
12734        let mut buf = if avail_len < Self::ENCODED_LEN {
12735            payload_buf[0..avail_len].copy_from_slice(__input);
12736            Bytes::new(&payload_buf)
12737        } else {
12738            Bytes::new(__input)
12739        };
12740        let mut __struct = Self::default();
12741        __struct.time_boot_ms = buf.get_u32_le()?;
12742        let tmp = buf.get_u32_le()?;
12743        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12744            tmp as <GimbalManagerCapFlags as Flags>::Bits,
12745        )
12746        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12747            flag_type: "GimbalManagerCapFlags",
12748            value: tmp as u64,
12749        })?;
12750        __struct.roll_min = buf.get_f32_le()?;
12751        __struct.roll_max = buf.get_f32_le()?;
12752        __struct.pitch_min = buf.get_f32_le()?;
12753        __struct.pitch_max = buf.get_f32_le()?;
12754        __struct.yaw_min = buf.get_f32_le()?;
12755        __struct.yaw_max = buf.get_f32_le()?;
12756        __struct.gimbal_device_id = buf.get_u8()?;
12757        Ok(__struct)
12758    }
12759    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12760        let mut __tmp = BytesMut::new(bytes);
12761        #[allow(clippy::absurd_extreme_comparisons)]
12762        #[allow(unused_comparisons)]
12763        if __tmp.remaining() < Self::ENCODED_LEN {
12764            panic!(
12765                "buffer is too small (need {} bytes, but got {})",
12766                Self::ENCODED_LEN,
12767                __tmp.remaining(),
12768            )
12769        }
12770        __tmp.put_u32_le(self.time_boot_ms);
12771        __tmp.put_u32_le(self.cap_flags.bits() as u32);
12772        __tmp.put_f32_le(self.roll_min);
12773        __tmp.put_f32_le(self.roll_max);
12774        __tmp.put_f32_le(self.pitch_min);
12775        __tmp.put_f32_le(self.pitch_max);
12776        __tmp.put_f32_le(self.yaw_min);
12777        __tmp.put_f32_le(self.yaw_max);
12778        __tmp.put_u8(self.gimbal_device_id);
12779        if matches!(version, MavlinkVersion::V2) {
12780            let len = __tmp.len();
12781            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12782        } else {
12783            __tmp.len()
12784        }
12785    }
12786}
12787#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12788#[doc = ""]
12789#[doc = "ID: 282"]
12790#[derive(Debug, Clone, PartialEq)]
12791#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12793#[cfg_attr(feature = "ts", derive(TS))]
12794#[cfg_attr(feature = "ts", ts(export))]
12795pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12796    #[doc = "High level gimbal manager flags to use."]
12797    pub flags: GimbalManagerFlags,
12798    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
12799    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12800    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12801    pub q: [f32; 4],
12802    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
12803    pub angular_velocity_x: f32,
12804    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
12805    pub angular_velocity_y: f32,
12806    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
12807    pub angular_velocity_z: f32,
12808    #[doc = "System ID"]
12809    pub target_system: u8,
12810    #[doc = "Component ID"]
12811    pub target_component: u8,
12812    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12813    pub gimbal_device_id: u8,
12814}
12815impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12816    pub const ENCODED_LEN: usize = 35usize;
12817    pub const DEFAULT: Self = Self {
12818        flags: GimbalManagerFlags::DEFAULT,
12819        q: [0.0_f32; 4usize],
12820        angular_velocity_x: 0.0_f32,
12821        angular_velocity_y: 0.0_f32,
12822        angular_velocity_z: 0.0_f32,
12823        target_system: 0_u8,
12824        target_component: 0_u8,
12825        gimbal_device_id: 0_u8,
12826    };
12827    #[cfg(feature = "arbitrary")]
12828    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12829        use arbitrary::{Arbitrary, Unstructured};
12830        let mut buf = [0u8; 1024];
12831        rng.fill_bytes(&mut buf);
12832        let mut unstructured = Unstructured::new(&buf);
12833        Self::arbitrary(&mut unstructured).unwrap_or_default()
12834    }
12835}
12836impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12837    fn default() -> Self {
12838        Self::DEFAULT.clone()
12839    }
12840}
12841impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12842    type Message = MavMessage;
12843    const ID: u32 = 282u32;
12844    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
12845    const EXTRA_CRC: u8 = 123u8;
12846    const ENCODED_LEN: usize = 35usize;
12847    fn deser(
12848        _version: MavlinkVersion,
12849        __input: &[u8],
12850    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12851        let avail_len = __input.len();
12852        let mut payload_buf = [0; Self::ENCODED_LEN];
12853        let mut buf = if avail_len < Self::ENCODED_LEN {
12854            payload_buf[0..avail_len].copy_from_slice(__input);
12855            Bytes::new(&payload_buf)
12856        } else {
12857            Bytes::new(__input)
12858        };
12859        let mut __struct = Self::default();
12860        let tmp = buf.get_u32_le()?;
12861        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
12862            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12863                flag_type: "GimbalManagerFlags",
12864                value: tmp as u64,
12865            })?;
12866        for v in &mut __struct.q {
12867            let val = buf.get_f32_le()?;
12868            *v = val;
12869        }
12870        __struct.angular_velocity_x = buf.get_f32_le()?;
12871        __struct.angular_velocity_y = buf.get_f32_le()?;
12872        __struct.angular_velocity_z = buf.get_f32_le()?;
12873        __struct.target_system = buf.get_u8()?;
12874        __struct.target_component = buf.get_u8()?;
12875        __struct.gimbal_device_id = buf.get_u8()?;
12876        Ok(__struct)
12877    }
12878    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12879        let mut __tmp = BytesMut::new(bytes);
12880        #[allow(clippy::absurd_extreme_comparisons)]
12881        #[allow(unused_comparisons)]
12882        if __tmp.remaining() < Self::ENCODED_LEN {
12883            panic!(
12884                "buffer is too small (need {} bytes, but got {})",
12885                Self::ENCODED_LEN,
12886                __tmp.remaining(),
12887            )
12888        }
12889        __tmp.put_u32_le(self.flags.bits() as u32);
12890        for val in &self.q {
12891            __tmp.put_f32_le(*val);
12892        }
12893        __tmp.put_f32_le(self.angular_velocity_x);
12894        __tmp.put_f32_le(self.angular_velocity_y);
12895        __tmp.put_f32_le(self.angular_velocity_z);
12896        __tmp.put_u8(self.target_system);
12897        __tmp.put_u8(self.target_component);
12898        __tmp.put_u8(self.gimbal_device_id);
12899        if matches!(version, MavlinkVersion::V2) {
12900            let len = __tmp.len();
12901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12902        } else {
12903            __tmp.len()
12904        }
12905    }
12906}
12907#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12908#[doc = ""]
12909#[doc = "ID: 288"]
12910#[derive(Debug, Clone, PartialEq)]
12911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12913#[cfg_attr(feature = "ts", derive(TS))]
12914#[cfg_attr(feature = "ts", ts(export))]
12915pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12916    #[doc = "High level gimbal manager flags."]
12917    pub flags: GimbalManagerFlags,
12918    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12919    pub pitch: f32,
12920    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12921    pub yaw: f32,
12922    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12923    pub pitch_rate: f32,
12924    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12925    pub yaw_rate: f32,
12926    #[doc = "System ID"]
12927    pub target_system: u8,
12928    #[doc = "Component ID"]
12929    pub target_component: u8,
12930    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12931    pub gimbal_device_id: u8,
12932}
12933impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12934    pub const ENCODED_LEN: usize = 23usize;
12935    pub const DEFAULT: Self = Self {
12936        flags: GimbalManagerFlags::DEFAULT,
12937        pitch: 0.0_f32,
12938        yaw: 0.0_f32,
12939        pitch_rate: 0.0_f32,
12940        yaw_rate: 0.0_f32,
12941        target_system: 0_u8,
12942        target_component: 0_u8,
12943        gimbal_device_id: 0_u8,
12944    };
12945    #[cfg(feature = "arbitrary")]
12946    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12947        use arbitrary::{Arbitrary, Unstructured};
12948        let mut buf = [0u8; 1024];
12949        rng.fill_bytes(&mut buf);
12950        let mut unstructured = Unstructured::new(&buf);
12951        Self::arbitrary(&mut unstructured).unwrap_or_default()
12952    }
12953}
12954impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12955    fn default() -> Self {
12956        Self::DEFAULT.clone()
12957    }
12958}
12959impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12960    type Message = MavMessage;
12961    const ID: u32 = 288u32;
12962    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
12963    const EXTRA_CRC: u8 = 20u8;
12964    const ENCODED_LEN: usize = 23usize;
12965    fn deser(
12966        _version: MavlinkVersion,
12967        __input: &[u8],
12968    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12969        let avail_len = __input.len();
12970        let mut payload_buf = [0; Self::ENCODED_LEN];
12971        let mut buf = if avail_len < Self::ENCODED_LEN {
12972            payload_buf[0..avail_len].copy_from_slice(__input);
12973            Bytes::new(&payload_buf)
12974        } else {
12975            Bytes::new(__input)
12976        };
12977        let mut __struct = Self::default();
12978        let tmp = buf.get_u32_le()?;
12979        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
12980            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12981                flag_type: "GimbalManagerFlags",
12982                value: tmp as u64,
12983            })?;
12984        __struct.pitch = buf.get_f32_le()?;
12985        __struct.yaw = buf.get_f32_le()?;
12986        __struct.pitch_rate = buf.get_f32_le()?;
12987        __struct.yaw_rate = buf.get_f32_le()?;
12988        __struct.target_system = buf.get_u8()?;
12989        __struct.target_component = buf.get_u8()?;
12990        __struct.gimbal_device_id = buf.get_u8()?;
12991        Ok(__struct)
12992    }
12993    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12994        let mut __tmp = BytesMut::new(bytes);
12995        #[allow(clippy::absurd_extreme_comparisons)]
12996        #[allow(unused_comparisons)]
12997        if __tmp.remaining() < Self::ENCODED_LEN {
12998            panic!(
12999                "buffer is too small (need {} bytes, but got {})",
13000                Self::ENCODED_LEN,
13001                __tmp.remaining(),
13002            )
13003        }
13004        __tmp.put_u32_le(self.flags.bits() as u32);
13005        __tmp.put_f32_le(self.pitch);
13006        __tmp.put_f32_le(self.yaw);
13007        __tmp.put_f32_le(self.pitch_rate);
13008        __tmp.put_f32_le(self.yaw_rate);
13009        __tmp.put_u8(self.target_system);
13010        __tmp.put_u8(self.target_component);
13011        __tmp.put_u8(self.gimbal_device_id);
13012        if matches!(version, MavlinkVersion::V2) {
13013            let len = __tmp.len();
13014            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13015        } else {
13016            __tmp.len()
13017        }
13018    }
13019}
13020#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13021#[doc = ""]
13022#[doc = "ID: 287"]
13023#[derive(Debug, Clone, PartialEq)]
13024#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13026#[cfg_attr(feature = "ts", derive(TS))]
13027#[cfg_attr(feature = "ts", ts(export))]
13028pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13029    #[doc = "High level gimbal manager flags to use."]
13030    pub flags: GimbalManagerFlags,
13031    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13032    pub pitch: f32,
13033    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13034    pub yaw: f32,
13035    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13036    pub pitch_rate: f32,
13037    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13038    pub yaw_rate: f32,
13039    #[doc = "System ID"]
13040    pub target_system: u8,
13041    #[doc = "Component ID"]
13042    pub target_component: u8,
13043    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13044    pub gimbal_device_id: u8,
13045}
13046impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13047    pub const ENCODED_LEN: usize = 23usize;
13048    pub const DEFAULT: Self = Self {
13049        flags: GimbalManagerFlags::DEFAULT,
13050        pitch: 0.0_f32,
13051        yaw: 0.0_f32,
13052        pitch_rate: 0.0_f32,
13053        yaw_rate: 0.0_f32,
13054        target_system: 0_u8,
13055        target_component: 0_u8,
13056        gimbal_device_id: 0_u8,
13057    };
13058    #[cfg(feature = "arbitrary")]
13059    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13060        use arbitrary::{Arbitrary, Unstructured};
13061        let mut buf = [0u8; 1024];
13062        rng.fill_bytes(&mut buf);
13063        let mut unstructured = Unstructured::new(&buf);
13064        Self::arbitrary(&mut unstructured).unwrap_or_default()
13065    }
13066}
13067impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13068    fn default() -> Self {
13069        Self::DEFAULT.clone()
13070    }
13071}
13072impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13073    type Message = MavMessage;
13074    const ID: u32 = 287u32;
13075    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13076    const EXTRA_CRC: u8 = 1u8;
13077    const ENCODED_LEN: usize = 23usize;
13078    fn deser(
13079        _version: MavlinkVersion,
13080        __input: &[u8],
13081    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13082        let avail_len = __input.len();
13083        let mut payload_buf = [0; Self::ENCODED_LEN];
13084        let mut buf = if avail_len < Self::ENCODED_LEN {
13085            payload_buf[0..avail_len].copy_from_slice(__input);
13086            Bytes::new(&payload_buf)
13087        } else {
13088            Bytes::new(__input)
13089        };
13090        let mut __struct = Self::default();
13091        let tmp = buf.get_u32_le()?;
13092        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13093            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13094                flag_type: "GimbalManagerFlags",
13095                value: tmp as u64,
13096            })?;
13097        __struct.pitch = buf.get_f32_le()?;
13098        __struct.yaw = buf.get_f32_le()?;
13099        __struct.pitch_rate = buf.get_f32_le()?;
13100        __struct.yaw_rate = buf.get_f32_le()?;
13101        __struct.target_system = buf.get_u8()?;
13102        __struct.target_component = buf.get_u8()?;
13103        __struct.gimbal_device_id = buf.get_u8()?;
13104        Ok(__struct)
13105    }
13106    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13107        let mut __tmp = BytesMut::new(bytes);
13108        #[allow(clippy::absurd_extreme_comparisons)]
13109        #[allow(unused_comparisons)]
13110        if __tmp.remaining() < Self::ENCODED_LEN {
13111            panic!(
13112                "buffer is too small (need {} bytes, but got {})",
13113                Self::ENCODED_LEN,
13114                __tmp.remaining(),
13115            )
13116        }
13117        __tmp.put_u32_le(self.flags.bits() as u32);
13118        __tmp.put_f32_le(self.pitch);
13119        __tmp.put_f32_le(self.yaw);
13120        __tmp.put_f32_le(self.pitch_rate);
13121        __tmp.put_f32_le(self.yaw_rate);
13122        __tmp.put_u8(self.target_system);
13123        __tmp.put_u8(self.target_component);
13124        __tmp.put_u8(self.gimbal_device_id);
13125        if matches!(version, MavlinkVersion::V2) {
13126            let len = __tmp.len();
13127            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13128        } else {
13129            __tmp.len()
13130        }
13131    }
13132}
13133#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13134#[doc = ""]
13135#[doc = "ID: 281"]
13136#[derive(Debug, Clone, PartialEq)]
13137#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13139#[cfg_attr(feature = "ts", derive(TS))]
13140#[cfg_attr(feature = "ts", ts(export))]
13141pub struct GIMBAL_MANAGER_STATUS_DATA {
13142    #[doc = "Timestamp (time since system boot)."]
13143    pub time_boot_ms: u32,
13144    #[doc = "High level gimbal manager flags currently applied."]
13145    pub flags: GimbalManagerFlags,
13146    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13147    pub gimbal_device_id: u8,
13148    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13149    pub primary_control_sysid: u8,
13150    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13151    pub primary_control_compid: u8,
13152    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13153    pub secondary_control_sysid: u8,
13154    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13155    pub secondary_control_compid: u8,
13156}
13157impl GIMBAL_MANAGER_STATUS_DATA {
13158    pub const ENCODED_LEN: usize = 13usize;
13159    pub const DEFAULT: Self = Self {
13160        time_boot_ms: 0_u32,
13161        flags: GimbalManagerFlags::DEFAULT,
13162        gimbal_device_id: 0_u8,
13163        primary_control_sysid: 0_u8,
13164        primary_control_compid: 0_u8,
13165        secondary_control_sysid: 0_u8,
13166        secondary_control_compid: 0_u8,
13167    };
13168    #[cfg(feature = "arbitrary")]
13169    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13170        use arbitrary::{Arbitrary, Unstructured};
13171        let mut buf = [0u8; 1024];
13172        rng.fill_bytes(&mut buf);
13173        let mut unstructured = Unstructured::new(&buf);
13174        Self::arbitrary(&mut unstructured).unwrap_or_default()
13175    }
13176}
13177impl Default for GIMBAL_MANAGER_STATUS_DATA {
13178    fn default() -> Self {
13179        Self::DEFAULT.clone()
13180    }
13181}
13182impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13183    type Message = MavMessage;
13184    const ID: u32 = 281u32;
13185    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13186    const EXTRA_CRC: u8 = 48u8;
13187    const ENCODED_LEN: usize = 13usize;
13188    fn deser(
13189        _version: MavlinkVersion,
13190        __input: &[u8],
13191    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13192        let avail_len = __input.len();
13193        let mut payload_buf = [0; Self::ENCODED_LEN];
13194        let mut buf = if avail_len < Self::ENCODED_LEN {
13195            payload_buf[0..avail_len].copy_from_slice(__input);
13196            Bytes::new(&payload_buf)
13197        } else {
13198            Bytes::new(__input)
13199        };
13200        let mut __struct = Self::default();
13201        __struct.time_boot_ms = buf.get_u32_le()?;
13202        let tmp = buf.get_u32_le()?;
13203        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13204            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13205                flag_type: "GimbalManagerFlags",
13206                value: tmp as u64,
13207            })?;
13208        __struct.gimbal_device_id = buf.get_u8()?;
13209        __struct.primary_control_sysid = buf.get_u8()?;
13210        __struct.primary_control_compid = buf.get_u8()?;
13211        __struct.secondary_control_sysid = buf.get_u8()?;
13212        __struct.secondary_control_compid = buf.get_u8()?;
13213        Ok(__struct)
13214    }
13215    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13216        let mut __tmp = BytesMut::new(bytes);
13217        #[allow(clippy::absurd_extreme_comparisons)]
13218        #[allow(unused_comparisons)]
13219        if __tmp.remaining() < Self::ENCODED_LEN {
13220            panic!(
13221                "buffer is too small (need {} bytes, but got {})",
13222                Self::ENCODED_LEN,
13223                __tmp.remaining(),
13224            )
13225        }
13226        __tmp.put_u32_le(self.time_boot_ms);
13227        __tmp.put_u32_le(self.flags.bits() as u32);
13228        __tmp.put_u8(self.gimbal_device_id);
13229        __tmp.put_u8(self.primary_control_sysid);
13230        __tmp.put_u8(self.primary_control_compid);
13231        __tmp.put_u8(self.secondary_control_sysid);
13232        __tmp.put_u8(self.secondary_control_compid);
13233        if matches!(version, MavlinkVersion::V2) {
13234            let len = __tmp.len();
13235            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13236        } else {
13237            __tmp.len()
13238        }
13239    }
13240}
13241#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13242#[doc = ""]
13243#[doc = "ID: 33"]
13244#[derive(Debug, Clone, PartialEq)]
13245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13247#[cfg_attr(feature = "ts", derive(TS))]
13248#[cfg_attr(feature = "ts", ts(export))]
13249pub struct GLOBAL_POSITION_INT_DATA {
13250    #[doc = "Timestamp (time since system boot)."]
13251    pub time_boot_ms: u32,
13252    #[doc = "Latitude, expressed"]
13253    pub lat: i32,
13254    #[doc = "Longitude, expressed"]
13255    pub lon: i32,
13256    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13257    pub alt: i32,
13258    #[doc = "Altitude above home"]
13259    pub relative_alt: i32,
13260    #[doc = "Ground X Speed (Latitude, positive north)"]
13261    pub vx: i16,
13262    #[doc = "Ground Y Speed (Longitude, positive east)"]
13263    pub vy: i16,
13264    #[doc = "Ground Z Speed (Altitude, positive down)"]
13265    pub vz: i16,
13266    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13267    pub hdg: u16,
13268}
13269impl GLOBAL_POSITION_INT_DATA {
13270    pub const ENCODED_LEN: usize = 28usize;
13271    pub const DEFAULT: Self = Self {
13272        time_boot_ms: 0_u32,
13273        lat: 0_i32,
13274        lon: 0_i32,
13275        alt: 0_i32,
13276        relative_alt: 0_i32,
13277        vx: 0_i16,
13278        vy: 0_i16,
13279        vz: 0_i16,
13280        hdg: 0_u16,
13281    };
13282    #[cfg(feature = "arbitrary")]
13283    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13284        use arbitrary::{Arbitrary, Unstructured};
13285        let mut buf = [0u8; 1024];
13286        rng.fill_bytes(&mut buf);
13287        let mut unstructured = Unstructured::new(&buf);
13288        Self::arbitrary(&mut unstructured).unwrap_or_default()
13289    }
13290}
13291impl Default for GLOBAL_POSITION_INT_DATA {
13292    fn default() -> Self {
13293        Self::DEFAULT.clone()
13294    }
13295}
13296impl MessageData for GLOBAL_POSITION_INT_DATA {
13297    type Message = MavMessage;
13298    const ID: u32 = 33u32;
13299    const NAME: &'static str = "GLOBAL_POSITION_INT";
13300    const EXTRA_CRC: u8 = 104u8;
13301    const ENCODED_LEN: usize = 28usize;
13302    fn deser(
13303        _version: MavlinkVersion,
13304        __input: &[u8],
13305    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13306        let avail_len = __input.len();
13307        let mut payload_buf = [0; Self::ENCODED_LEN];
13308        let mut buf = if avail_len < Self::ENCODED_LEN {
13309            payload_buf[0..avail_len].copy_from_slice(__input);
13310            Bytes::new(&payload_buf)
13311        } else {
13312            Bytes::new(__input)
13313        };
13314        let mut __struct = Self::default();
13315        __struct.time_boot_ms = buf.get_u32_le()?;
13316        __struct.lat = buf.get_i32_le()?;
13317        __struct.lon = buf.get_i32_le()?;
13318        __struct.alt = buf.get_i32_le()?;
13319        __struct.relative_alt = buf.get_i32_le()?;
13320        __struct.vx = buf.get_i16_le()?;
13321        __struct.vy = buf.get_i16_le()?;
13322        __struct.vz = buf.get_i16_le()?;
13323        __struct.hdg = buf.get_u16_le()?;
13324        Ok(__struct)
13325    }
13326    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13327        let mut __tmp = BytesMut::new(bytes);
13328        #[allow(clippy::absurd_extreme_comparisons)]
13329        #[allow(unused_comparisons)]
13330        if __tmp.remaining() < Self::ENCODED_LEN {
13331            panic!(
13332                "buffer is too small (need {} bytes, but got {})",
13333                Self::ENCODED_LEN,
13334                __tmp.remaining(),
13335            )
13336        }
13337        __tmp.put_u32_le(self.time_boot_ms);
13338        __tmp.put_i32_le(self.lat);
13339        __tmp.put_i32_le(self.lon);
13340        __tmp.put_i32_le(self.alt);
13341        __tmp.put_i32_le(self.relative_alt);
13342        __tmp.put_i16_le(self.vx);
13343        __tmp.put_i16_le(self.vy);
13344        __tmp.put_i16_le(self.vz);
13345        __tmp.put_u16_le(self.hdg);
13346        if matches!(version, MavlinkVersion::V2) {
13347            let len = __tmp.len();
13348            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13349        } else {
13350            __tmp.len()
13351        }
13352    }
13353}
13354#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13355#[doc = ""]
13356#[doc = "ID: 63"]
13357#[derive(Debug, Clone, PartialEq)]
13358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13360#[cfg_attr(feature = "ts", derive(TS))]
13361#[cfg_attr(feature = "ts", ts(export))]
13362pub struct GLOBAL_POSITION_INT_COV_DATA {
13363    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13364    pub time_usec: u64,
13365    #[doc = "Latitude"]
13366    pub lat: i32,
13367    #[doc = "Longitude"]
13368    pub lon: i32,
13369    #[doc = "Altitude in meters above MSL"]
13370    pub alt: i32,
13371    #[doc = "Altitude above ground"]
13372    pub relative_alt: i32,
13373    #[doc = "Ground X Speed (Latitude)"]
13374    pub vx: f32,
13375    #[doc = "Ground Y Speed (Longitude)"]
13376    pub vy: f32,
13377    #[doc = "Ground Z Speed (Altitude)"]
13378    pub vz: f32,
13379    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13380    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13381    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13382    pub covariance: [f32; 36],
13383    #[doc = "Class id of the estimator this estimate originated from."]
13384    pub estimator_type: MavEstimatorType,
13385}
13386impl GLOBAL_POSITION_INT_COV_DATA {
13387    pub const ENCODED_LEN: usize = 181usize;
13388    pub const DEFAULT: Self = Self {
13389        time_usec: 0_u64,
13390        lat: 0_i32,
13391        lon: 0_i32,
13392        alt: 0_i32,
13393        relative_alt: 0_i32,
13394        vx: 0.0_f32,
13395        vy: 0.0_f32,
13396        vz: 0.0_f32,
13397        covariance: [0.0_f32; 36usize],
13398        estimator_type: MavEstimatorType::DEFAULT,
13399    };
13400    #[cfg(feature = "arbitrary")]
13401    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13402        use arbitrary::{Arbitrary, Unstructured};
13403        let mut buf = [0u8; 1024];
13404        rng.fill_bytes(&mut buf);
13405        let mut unstructured = Unstructured::new(&buf);
13406        Self::arbitrary(&mut unstructured).unwrap_or_default()
13407    }
13408}
13409impl Default for GLOBAL_POSITION_INT_COV_DATA {
13410    fn default() -> Self {
13411        Self::DEFAULT.clone()
13412    }
13413}
13414impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13415    type Message = MavMessage;
13416    const ID: u32 = 63u32;
13417    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13418    const EXTRA_CRC: u8 = 119u8;
13419    const ENCODED_LEN: usize = 181usize;
13420    fn deser(
13421        _version: MavlinkVersion,
13422        __input: &[u8],
13423    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13424        let avail_len = __input.len();
13425        let mut payload_buf = [0; Self::ENCODED_LEN];
13426        let mut buf = if avail_len < Self::ENCODED_LEN {
13427            payload_buf[0..avail_len].copy_from_slice(__input);
13428            Bytes::new(&payload_buf)
13429        } else {
13430            Bytes::new(__input)
13431        };
13432        let mut __struct = Self::default();
13433        __struct.time_usec = buf.get_u64_le()?;
13434        __struct.lat = buf.get_i32_le()?;
13435        __struct.lon = buf.get_i32_le()?;
13436        __struct.alt = buf.get_i32_le()?;
13437        __struct.relative_alt = buf.get_i32_le()?;
13438        __struct.vx = buf.get_f32_le()?;
13439        __struct.vy = buf.get_f32_le()?;
13440        __struct.vz = buf.get_f32_le()?;
13441        for v in &mut __struct.covariance {
13442            let val = buf.get_f32_le()?;
13443            *v = val;
13444        }
13445        let tmp = buf.get_u8()?;
13446        __struct.estimator_type =
13447            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13448                enum_type: "MavEstimatorType",
13449                value: tmp as u64,
13450            })?;
13451        Ok(__struct)
13452    }
13453    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13454        let mut __tmp = BytesMut::new(bytes);
13455        #[allow(clippy::absurd_extreme_comparisons)]
13456        #[allow(unused_comparisons)]
13457        if __tmp.remaining() < Self::ENCODED_LEN {
13458            panic!(
13459                "buffer is too small (need {} bytes, but got {})",
13460                Self::ENCODED_LEN,
13461                __tmp.remaining(),
13462            )
13463        }
13464        __tmp.put_u64_le(self.time_usec);
13465        __tmp.put_i32_le(self.lat);
13466        __tmp.put_i32_le(self.lon);
13467        __tmp.put_i32_le(self.alt);
13468        __tmp.put_i32_le(self.relative_alt);
13469        __tmp.put_f32_le(self.vx);
13470        __tmp.put_f32_le(self.vy);
13471        __tmp.put_f32_le(self.vz);
13472        for val in &self.covariance {
13473            __tmp.put_f32_le(*val);
13474        }
13475        __tmp.put_u8(self.estimator_type as u8);
13476        if matches!(version, MavlinkVersion::V2) {
13477            let len = __tmp.len();
13478            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13479        } else {
13480            __tmp.len()
13481        }
13482    }
13483}
13484#[doc = "Global position/attitude estimate from a vision source."]
13485#[doc = ""]
13486#[doc = "ID: 101"]
13487#[derive(Debug, Clone, PartialEq)]
13488#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13489#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13490#[cfg_attr(feature = "ts", derive(TS))]
13491#[cfg_attr(feature = "ts", ts(export))]
13492pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13493    #[doc = "Timestamp (UNIX time or since system boot)"]
13494    pub usec: u64,
13495    #[doc = "Global X position"]
13496    pub x: f32,
13497    #[doc = "Global Y position"]
13498    pub y: f32,
13499    #[doc = "Global Z position"]
13500    pub z: f32,
13501    #[doc = "Roll angle"]
13502    pub roll: f32,
13503    #[doc = "Pitch angle"]
13504    pub pitch: f32,
13505    #[doc = "Yaw angle"]
13506    pub yaw: f32,
13507    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13508    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13509    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13510    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13511    pub covariance: [f32; 21],
13512    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13513    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13514    pub reset_counter: u8,
13515}
13516impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13517    pub const ENCODED_LEN: usize = 117usize;
13518    pub const DEFAULT: Self = Self {
13519        usec: 0_u64,
13520        x: 0.0_f32,
13521        y: 0.0_f32,
13522        z: 0.0_f32,
13523        roll: 0.0_f32,
13524        pitch: 0.0_f32,
13525        yaw: 0.0_f32,
13526        covariance: [0.0_f32; 21usize],
13527        reset_counter: 0_u8,
13528    };
13529    #[cfg(feature = "arbitrary")]
13530    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13531        use arbitrary::{Arbitrary, Unstructured};
13532        let mut buf = [0u8; 1024];
13533        rng.fill_bytes(&mut buf);
13534        let mut unstructured = Unstructured::new(&buf);
13535        Self::arbitrary(&mut unstructured).unwrap_or_default()
13536    }
13537}
13538impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13539    fn default() -> Self {
13540        Self::DEFAULT.clone()
13541    }
13542}
13543impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13544    type Message = MavMessage;
13545    const ID: u32 = 101u32;
13546    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13547    const EXTRA_CRC: u8 = 102u8;
13548    const ENCODED_LEN: usize = 117usize;
13549    fn deser(
13550        _version: MavlinkVersion,
13551        __input: &[u8],
13552    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13553        let avail_len = __input.len();
13554        let mut payload_buf = [0; Self::ENCODED_LEN];
13555        let mut buf = if avail_len < Self::ENCODED_LEN {
13556            payload_buf[0..avail_len].copy_from_slice(__input);
13557            Bytes::new(&payload_buf)
13558        } else {
13559            Bytes::new(__input)
13560        };
13561        let mut __struct = Self::default();
13562        __struct.usec = buf.get_u64_le()?;
13563        __struct.x = buf.get_f32_le()?;
13564        __struct.y = buf.get_f32_le()?;
13565        __struct.z = buf.get_f32_le()?;
13566        __struct.roll = buf.get_f32_le()?;
13567        __struct.pitch = buf.get_f32_le()?;
13568        __struct.yaw = buf.get_f32_le()?;
13569        for v in &mut __struct.covariance {
13570            let val = buf.get_f32_le()?;
13571            *v = val;
13572        }
13573        __struct.reset_counter = buf.get_u8()?;
13574        Ok(__struct)
13575    }
13576    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13577        let mut __tmp = BytesMut::new(bytes);
13578        #[allow(clippy::absurd_extreme_comparisons)]
13579        #[allow(unused_comparisons)]
13580        if __tmp.remaining() < Self::ENCODED_LEN {
13581            panic!(
13582                "buffer is too small (need {} bytes, but got {})",
13583                Self::ENCODED_LEN,
13584                __tmp.remaining(),
13585            )
13586        }
13587        __tmp.put_u64_le(self.usec);
13588        __tmp.put_f32_le(self.x);
13589        __tmp.put_f32_le(self.y);
13590        __tmp.put_f32_le(self.z);
13591        __tmp.put_f32_le(self.roll);
13592        __tmp.put_f32_le(self.pitch);
13593        __tmp.put_f32_le(self.yaw);
13594        if matches!(version, MavlinkVersion::V2) {
13595            for val in &self.covariance {
13596                __tmp.put_f32_le(*val);
13597            }
13598            __tmp.put_u8(self.reset_counter);
13599            let len = __tmp.len();
13600            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13601        } else {
13602            __tmp.len()
13603        }
13604    }
13605}
13606#[doc = "Second GPS data."]
13607#[doc = ""]
13608#[doc = "ID: 124"]
13609#[derive(Debug, Clone, PartialEq)]
13610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13612#[cfg_attr(feature = "ts", derive(TS))]
13613#[cfg_attr(feature = "ts", ts(export))]
13614pub struct GPS2_RAW_DATA {
13615    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13616    pub time_usec: u64,
13617    #[doc = "Latitude (WGS84)"]
13618    pub lat: i32,
13619    #[doc = "Longitude (WGS84)"]
13620    pub lon: i32,
13621    #[doc = "Altitude (MSL). Positive for up."]
13622    pub alt: i32,
13623    #[doc = "Age of DGPS info"]
13624    pub dgps_age: u32,
13625    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13626    pub eph: u16,
13627    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13628    pub epv: u16,
13629    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13630    pub vel: u16,
13631    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13632    pub cog: u16,
13633    #[doc = "GPS fix type."]
13634    pub fix_type: GpsFixType,
13635    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13636    pub satellites_visible: u8,
13637    #[doc = "Number of DGPS satellites"]
13638    pub dgps_numch: u8,
13639    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13640    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13641    pub yaw: u16,
13642    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13643    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13644    pub alt_ellipsoid: i32,
13645    #[doc = "Position uncertainty."]
13646    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13647    pub h_acc: u32,
13648    #[doc = "Altitude uncertainty."]
13649    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13650    pub v_acc: u32,
13651    #[doc = "Speed uncertainty."]
13652    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13653    pub vel_acc: u32,
13654    #[doc = "Heading / track uncertainty"]
13655    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13656    pub hdg_acc: u32,
13657}
13658impl GPS2_RAW_DATA {
13659    pub const ENCODED_LEN: usize = 57usize;
13660    pub const DEFAULT: Self = Self {
13661        time_usec: 0_u64,
13662        lat: 0_i32,
13663        lon: 0_i32,
13664        alt: 0_i32,
13665        dgps_age: 0_u32,
13666        eph: 0_u16,
13667        epv: 0_u16,
13668        vel: 0_u16,
13669        cog: 0_u16,
13670        fix_type: GpsFixType::DEFAULT,
13671        satellites_visible: 0_u8,
13672        dgps_numch: 0_u8,
13673        yaw: 0_u16,
13674        alt_ellipsoid: 0_i32,
13675        h_acc: 0_u32,
13676        v_acc: 0_u32,
13677        vel_acc: 0_u32,
13678        hdg_acc: 0_u32,
13679    };
13680    #[cfg(feature = "arbitrary")]
13681    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13682        use arbitrary::{Arbitrary, Unstructured};
13683        let mut buf = [0u8; 1024];
13684        rng.fill_bytes(&mut buf);
13685        let mut unstructured = Unstructured::new(&buf);
13686        Self::arbitrary(&mut unstructured).unwrap_or_default()
13687    }
13688}
13689impl Default for GPS2_RAW_DATA {
13690    fn default() -> Self {
13691        Self::DEFAULT.clone()
13692    }
13693}
13694impl MessageData for GPS2_RAW_DATA {
13695    type Message = MavMessage;
13696    const ID: u32 = 124u32;
13697    const NAME: &'static str = "GPS2_RAW";
13698    const EXTRA_CRC: u8 = 87u8;
13699    const ENCODED_LEN: usize = 57usize;
13700    fn deser(
13701        _version: MavlinkVersion,
13702        __input: &[u8],
13703    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13704        let avail_len = __input.len();
13705        let mut payload_buf = [0; Self::ENCODED_LEN];
13706        let mut buf = if avail_len < Self::ENCODED_LEN {
13707            payload_buf[0..avail_len].copy_from_slice(__input);
13708            Bytes::new(&payload_buf)
13709        } else {
13710            Bytes::new(__input)
13711        };
13712        let mut __struct = Self::default();
13713        __struct.time_usec = buf.get_u64_le()?;
13714        __struct.lat = buf.get_i32_le()?;
13715        __struct.lon = buf.get_i32_le()?;
13716        __struct.alt = buf.get_i32_le()?;
13717        __struct.dgps_age = buf.get_u32_le()?;
13718        __struct.eph = buf.get_u16_le()?;
13719        __struct.epv = buf.get_u16_le()?;
13720        __struct.vel = buf.get_u16_le()?;
13721        __struct.cog = buf.get_u16_le()?;
13722        let tmp = buf.get_u8()?;
13723        __struct.fix_type =
13724            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13725                enum_type: "GpsFixType",
13726                value: tmp as u64,
13727            })?;
13728        __struct.satellites_visible = buf.get_u8()?;
13729        __struct.dgps_numch = buf.get_u8()?;
13730        __struct.yaw = buf.get_u16_le()?;
13731        __struct.alt_ellipsoid = buf.get_i32_le()?;
13732        __struct.h_acc = buf.get_u32_le()?;
13733        __struct.v_acc = buf.get_u32_le()?;
13734        __struct.vel_acc = buf.get_u32_le()?;
13735        __struct.hdg_acc = buf.get_u32_le()?;
13736        Ok(__struct)
13737    }
13738    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13739        let mut __tmp = BytesMut::new(bytes);
13740        #[allow(clippy::absurd_extreme_comparisons)]
13741        #[allow(unused_comparisons)]
13742        if __tmp.remaining() < Self::ENCODED_LEN {
13743            panic!(
13744                "buffer is too small (need {} bytes, but got {})",
13745                Self::ENCODED_LEN,
13746                __tmp.remaining(),
13747            )
13748        }
13749        __tmp.put_u64_le(self.time_usec);
13750        __tmp.put_i32_le(self.lat);
13751        __tmp.put_i32_le(self.lon);
13752        __tmp.put_i32_le(self.alt);
13753        __tmp.put_u32_le(self.dgps_age);
13754        __tmp.put_u16_le(self.eph);
13755        __tmp.put_u16_le(self.epv);
13756        __tmp.put_u16_le(self.vel);
13757        __tmp.put_u16_le(self.cog);
13758        __tmp.put_u8(self.fix_type as u8);
13759        __tmp.put_u8(self.satellites_visible);
13760        __tmp.put_u8(self.dgps_numch);
13761        if matches!(version, MavlinkVersion::V2) {
13762            __tmp.put_u16_le(self.yaw);
13763            __tmp.put_i32_le(self.alt_ellipsoid);
13764            __tmp.put_u32_le(self.h_acc);
13765            __tmp.put_u32_le(self.v_acc);
13766            __tmp.put_u32_le(self.vel_acc);
13767            __tmp.put_u32_le(self.hdg_acc);
13768            let len = __tmp.len();
13769            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13770        } else {
13771            __tmp.len()
13772        }
13773    }
13774}
13775#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
13776#[doc = ""]
13777#[doc = "ID: 128"]
13778#[derive(Debug, Clone, PartialEq)]
13779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13781#[cfg_attr(feature = "ts", derive(TS))]
13782#[cfg_attr(feature = "ts", ts(export))]
13783pub struct GPS2_RTK_DATA {
13784    #[doc = "Time since boot of last baseline message received."]
13785    pub time_last_baseline_ms: u32,
13786    #[doc = "GPS Time of Week of last baseline"]
13787    pub tow: u32,
13788    #[doc = "Current baseline in ECEF x or NED north component."]
13789    pub baseline_a_mm: i32,
13790    #[doc = "Current baseline in ECEF y or NED east component."]
13791    pub baseline_b_mm: i32,
13792    #[doc = "Current baseline in ECEF z or NED down component."]
13793    pub baseline_c_mm: i32,
13794    #[doc = "Current estimate of baseline accuracy."]
13795    pub accuracy: u32,
13796    #[doc = "Current number of integer ambiguity hypotheses."]
13797    pub iar_num_hypotheses: i32,
13798    #[doc = "GPS Week Number of last baseline"]
13799    pub wn: u16,
13800    #[doc = "Identification of connected RTK receiver."]
13801    pub rtk_receiver_id: u8,
13802    #[doc = "GPS-specific health report for RTK data."]
13803    pub rtk_health: u8,
13804    #[doc = "Rate of baseline messages being received by GPS"]
13805    pub rtk_rate: u8,
13806    #[doc = "Current number of sats used for RTK calculation."]
13807    pub nsats: u8,
13808    #[doc = "Coordinate system of baseline"]
13809    pub baseline_coords_type: RtkBaselineCoordinateSystem,
13810}
13811impl GPS2_RTK_DATA {
13812    pub const ENCODED_LEN: usize = 35usize;
13813    pub const DEFAULT: Self = Self {
13814        time_last_baseline_ms: 0_u32,
13815        tow: 0_u32,
13816        baseline_a_mm: 0_i32,
13817        baseline_b_mm: 0_i32,
13818        baseline_c_mm: 0_i32,
13819        accuracy: 0_u32,
13820        iar_num_hypotheses: 0_i32,
13821        wn: 0_u16,
13822        rtk_receiver_id: 0_u8,
13823        rtk_health: 0_u8,
13824        rtk_rate: 0_u8,
13825        nsats: 0_u8,
13826        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
13827    };
13828    #[cfg(feature = "arbitrary")]
13829    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13830        use arbitrary::{Arbitrary, Unstructured};
13831        let mut buf = [0u8; 1024];
13832        rng.fill_bytes(&mut buf);
13833        let mut unstructured = Unstructured::new(&buf);
13834        Self::arbitrary(&mut unstructured).unwrap_or_default()
13835    }
13836}
13837impl Default for GPS2_RTK_DATA {
13838    fn default() -> Self {
13839        Self::DEFAULT.clone()
13840    }
13841}
13842impl MessageData for GPS2_RTK_DATA {
13843    type Message = MavMessage;
13844    const ID: u32 = 128u32;
13845    const NAME: &'static str = "GPS2_RTK";
13846    const EXTRA_CRC: u8 = 226u8;
13847    const ENCODED_LEN: usize = 35usize;
13848    fn deser(
13849        _version: MavlinkVersion,
13850        __input: &[u8],
13851    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13852        let avail_len = __input.len();
13853        let mut payload_buf = [0; Self::ENCODED_LEN];
13854        let mut buf = if avail_len < Self::ENCODED_LEN {
13855            payload_buf[0..avail_len].copy_from_slice(__input);
13856            Bytes::new(&payload_buf)
13857        } else {
13858            Bytes::new(__input)
13859        };
13860        let mut __struct = Self::default();
13861        __struct.time_last_baseline_ms = buf.get_u32_le()?;
13862        __struct.tow = buf.get_u32_le()?;
13863        __struct.baseline_a_mm = buf.get_i32_le()?;
13864        __struct.baseline_b_mm = buf.get_i32_le()?;
13865        __struct.baseline_c_mm = buf.get_i32_le()?;
13866        __struct.accuracy = buf.get_u32_le()?;
13867        __struct.iar_num_hypotheses = buf.get_i32_le()?;
13868        __struct.wn = buf.get_u16_le()?;
13869        __struct.rtk_receiver_id = buf.get_u8()?;
13870        __struct.rtk_health = buf.get_u8()?;
13871        __struct.rtk_rate = buf.get_u8()?;
13872        __struct.nsats = buf.get_u8()?;
13873        let tmp = buf.get_u8()?;
13874        __struct.baseline_coords_type =
13875            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13876                enum_type: "RtkBaselineCoordinateSystem",
13877                value: tmp as u64,
13878            })?;
13879        Ok(__struct)
13880    }
13881    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13882        let mut __tmp = BytesMut::new(bytes);
13883        #[allow(clippy::absurd_extreme_comparisons)]
13884        #[allow(unused_comparisons)]
13885        if __tmp.remaining() < Self::ENCODED_LEN {
13886            panic!(
13887                "buffer is too small (need {} bytes, but got {})",
13888                Self::ENCODED_LEN,
13889                __tmp.remaining(),
13890            )
13891        }
13892        __tmp.put_u32_le(self.time_last_baseline_ms);
13893        __tmp.put_u32_le(self.tow);
13894        __tmp.put_i32_le(self.baseline_a_mm);
13895        __tmp.put_i32_le(self.baseline_b_mm);
13896        __tmp.put_i32_le(self.baseline_c_mm);
13897        __tmp.put_u32_le(self.accuracy);
13898        __tmp.put_i32_le(self.iar_num_hypotheses);
13899        __tmp.put_u16_le(self.wn);
13900        __tmp.put_u8(self.rtk_receiver_id);
13901        __tmp.put_u8(self.rtk_health);
13902        __tmp.put_u8(self.rtk_rate);
13903        __tmp.put_u8(self.nsats);
13904        __tmp.put_u8(self.baseline_coords_type as u8);
13905        if matches!(version, MavlinkVersion::V2) {
13906            let len = __tmp.len();
13907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13908        } else {
13909            __tmp.len()
13910        }
13911    }
13912}
13913#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
13914#[doc = ""]
13915#[doc = "ID: 49"]
13916#[derive(Debug, Clone, PartialEq)]
13917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13919#[cfg_attr(feature = "ts", derive(TS))]
13920#[cfg_attr(feature = "ts", ts(export))]
13921pub struct GPS_GLOBAL_ORIGIN_DATA {
13922    #[doc = "Latitude (WGS84)"]
13923    pub latitude: i32,
13924    #[doc = "Longitude (WGS84)"]
13925    pub longitude: i32,
13926    #[doc = "Altitude (MSL). Positive for up."]
13927    pub altitude: i32,
13928    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13929    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13930    pub time_usec: u64,
13931}
13932impl GPS_GLOBAL_ORIGIN_DATA {
13933    pub const ENCODED_LEN: usize = 20usize;
13934    pub const DEFAULT: Self = Self {
13935        latitude: 0_i32,
13936        longitude: 0_i32,
13937        altitude: 0_i32,
13938        time_usec: 0_u64,
13939    };
13940    #[cfg(feature = "arbitrary")]
13941    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13942        use arbitrary::{Arbitrary, Unstructured};
13943        let mut buf = [0u8; 1024];
13944        rng.fill_bytes(&mut buf);
13945        let mut unstructured = Unstructured::new(&buf);
13946        Self::arbitrary(&mut unstructured).unwrap_or_default()
13947    }
13948}
13949impl Default for GPS_GLOBAL_ORIGIN_DATA {
13950    fn default() -> Self {
13951        Self::DEFAULT.clone()
13952    }
13953}
13954impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
13955    type Message = MavMessage;
13956    const ID: u32 = 49u32;
13957    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
13958    const EXTRA_CRC: u8 = 39u8;
13959    const ENCODED_LEN: usize = 20usize;
13960    fn deser(
13961        _version: MavlinkVersion,
13962        __input: &[u8],
13963    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13964        let avail_len = __input.len();
13965        let mut payload_buf = [0; Self::ENCODED_LEN];
13966        let mut buf = if avail_len < Self::ENCODED_LEN {
13967            payload_buf[0..avail_len].copy_from_slice(__input);
13968            Bytes::new(&payload_buf)
13969        } else {
13970            Bytes::new(__input)
13971        };
13972        let mut __struct = Self::default();
13973        __struct.latitude = buf.get_i32_le()?;
13974        __struct.longitude = buf.get_i32_le()?;
13975        __struct.altitude = buf.get_i32_le()?;
13976        __struct.time_usec = buf.get_u64_le()?;
13977        Ok(__struct)
13978    }
13979    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13980        let mut __tmp = BytesMut::new(bytes);
13981        #[allow(clippy::absurd_extreme_comparisons)]
13982        #[allow(unused_comparisons)]
13983        if __tmp.remaining() < Self::ENCODED_LEN {
13984            panic!(
13985                "buffer is too small (need {} bytes, but got {})",
13986                Self::ENCODED_LEN,
13987                __tmp.remaining(),
13988            )
13989        }
13990        __tmp.put_i32_le(self.latitude);
13991        __tmp.put_i32_le(self.longitude);
13992        __tmp.put_i32_le(self.altitude);
13993        if matches!(version, MavlinkVersion::V2) {
13994            __tmp.put_u64_le(self.time_usec);
13995            let len = __tmp.len();
13996            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13997        } else {
13998            __tmp.len()
13999        }
14000    }
14001}
14002#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14003#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14004#[doc = ""]
14005#[doc = "ID: 123"]
14006#[derive(Debug, Clone, PartialEq)]
14007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14008#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14009#[cfg_attr(feature = "ts", derive(TS))]
14010#[cfg_attr(feature = "ts", ts(export))]
14011pub struct GPS_INJECT_DATA_DATA {
14012    #[doc = "System ID"]
14013    pub target_system: u8,
14014    #[doc = "Component ID"]
14015    pub target_component: u8,
14016    #[doc = "Data length"]
14017    pub len: u8,
14018    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14019    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14020    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14021    pub data: [u8; 110],
14022}
14023impl GPS_INJECT_DATA_DATA {
14024    pub const ENCODED_LEN: usize = 113usize;
14025    pub const DEFAULT: Self = Self {
14026        target_system: 0_u8,
14027        target_component: 0_u8,
14028        len: 0_u8,
14029        data: [0_u8; 110usize],
14030    };
14031    #[cfg(feature = "arbitrary")]
14032    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14033        use arbitrary::{Arbitrary, Unstructured};
14034        let mut buf = [0u8; 1024];
14035        rng.fill_bytes(&mut buf);
14036        let mut unstructured = Unstructured::new(&buf);
14037        Self::arbitrary(&mut unstructured).unwrap_or_default()
14038    }
14039}
14040impl Default for GPS_INJECT_DATA_DATA {
14041    fn default() -> Self {
14042        Self::DEFAULT.clone()
14043    }
14044}
14045impl MessageData for GPS_INJECT_DATA_DATA {
14046    type Message = MavMessage;
14047    const ID: u32 = 123u32;
14048    const NAME: &'static str = "GPS_INJECT_DATA";
14049    const EXTRA_CRC: u8 = 250u8;
14050    const ENCODED_LEN: usize = 113usize;
14051    fn deser(
14052        _version: MavlinkVersion,
14053        __input: &[u8],
14054    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14055        let avail_len = __input.len();
14056        let mut payload_buf = [0; Self::ENCODED_LEN];
14057        let mut buf = if avail_len < Self::ENCODED_LEN {
14058            payload_buf[0..avail_len].copy_from_slice(__input);
14059            Bytes::new(&payload_buf)
14060        } else {
14061            Bytes::new(__input)
14062        };
14063        let mut __struct = Self::default();
14064        __struct.target_system = buf.get_u8()?;
14065        __struct.target_component = buf.get_u8()?;
14066        __struct.len = buf.get_u8()?;
14067        for v in &mut __struct.data {
14068            let val = buf.get_u8()?;
14069            *v = val;
14070        }
14071        Ok(__struct)
14072    }
14073    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14074        let mut __tmp = BytesMut::new(bytes);
14075        #[allow(clippy::absurd_extreme_comparisons)]
14076        #[allow(unused_comparisons)]
14077        if __tmp.remaining() < Self::ENCODED_LEN {
14078            panic!(
14079                "buffer is too small (need {} bytes, but got {})",
14080                Self::ENCODED_LEN,
14081                __tmp.remaining(),
14082            )
14083        }
14084        __tmp.put_u8(self.target_system);
14085        __tmp.put_u8(self.target_component);
14086        __tmp.put_u8(self.len);
14087        for val in &self.data {
14088            __tmp.put_u8(*val);
14089        }
14090        if matches!(version, MavlinkVersion::V2) {
14091            let len = __tmp.len();
14092            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14093        } else {
14094            __tmp.len()
14095        }
14096    }
14097}
14098#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14099#[doc = ""]
14100#[doc = "ID: 232"]
14101#[derive(Debug, Clone, PartialEq)]
14102#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14103#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14104#[cfg_attr(feature = "ts", derive(TS))]
14105#[cfg_attr(feature = "ts", ts(export))]
14106pub struct GPS_INPUT_DATA {
14107    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14108    pub time_usec: u64,
14109    #[doc = "GPS time (from start of GPS week)"]
14110    pub time_week_ms: u32,
14111    #[doc = "Latitude (WGS84)"]
14112    pub lat: i32,
14113    #[doc = "Longitude (WGS84)"]
14114    pub lon: i32,
14115    #[doc = "Altitude (MSL). Positive for up."]
14116    pub alt: f32,
14117    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14118    pub hdop: f32,
14119    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14120    pub vdop: f32,
14121    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14122    pub vn: f32,
14123    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14124    pub ve: f32,
14125    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14126    pub vd: f32,
14127    #[doc = "GPS speed accuracy"]
14128    pub speed_accuracy: f32,
14129    #[doc = "GPS horizontal accuracy"]
14130    pub horiz_accuracy: f32,
14131    #[doc = "GPS vertical accuracy"]
14132    pub vert_accuracy: f32,
14133    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14134    pub ignore_flags: GpsInputIgnoreFlags,
14135    #[doc = "GPS week number"]
14136    pub time_week: u16,
14137    #[doc = "ID of the GPS for multiple GPS inputs"]
14138    pub gps_id: u8,
14139    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14140    pub fix_type: u8,
14141    #[doc = "Number of satellites visible."]
14142    pub satellites_visible: u8,
14143    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14144    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14145    pub yaw: u16,
14146}
14147impl GPS_INPUT_DATA {
14148    pub const ENCODED_LEN: usize = 65usize;
14149    pub const DEFAULT: Self = Self {
14150        time_usec: 0_u64,
14151        time_week_ms: 0_u32,
14152        lat: 0_i32,
14153        lon: 0_i32,
14154        alt: 0.0_f32,
14155        hdop: 0.0_f32,
14156        vdop: 0.0_f32,
14157        vn: 0.0_f32,
14158        ve: 0.0_f32,
14159        vd: 0.0_f32,
14160        speed_accuracy: 0.0_f32,
14161        horiz_accuracy: 0.0_f32,
14162        vert_accuracy: 0.0_f32,
14163        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14164        time_week: 0_u16,
14165        gps_id: 0_u8,
14166        fix_type: 0_u8,
14167        satellites_visible: 0_u8,
14168        yaw: 0_u16,
14169    };
14170    #[cfg(feature = "arbitrary")]
14171    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14172        use arbitrary::{Arbitrary, Unstructured};
14173        let mut buf = [0u8; 1024];
14174        rng.fill_bytes(&mut buf);
14175        let mut unstructured = Unstructured::new(&buf);
14176        Self::arbitrary(&mut unstructured).unwrap_or_default()
14177    }
14178}
14179impl Default for GPS_INPUT_DATA {
14180    fn default() -> Self {
14181        Self::DEFAULT.clone()
14182    }
14183}
14184impl MessageData for GPS_INPUT_DATA {
14185    type Message = MavMessage;
14186    const ID: u32 = 232u32;
14187    const NAME: &'static str = "GPS_INPUT";
14188    const EXTRA_CRC: u8 = 151u8;
14189    const ENCODED_LEN: usize = 65usize;
14190    fn deser(
14191        _version: MavlinkVersion,
14192        __input: &[u8],
14193    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14194        let avail_len = __input.len();
14195        let mut payload_buf = [0; Self::ENCODED_LEN];
14196        let mut buf = if avail_len < Self::ENCODED_LEN {
14197            payload_buf[0..avail_len].copy_from_slice(__input);
14198            Bytes::new(&payload_buf)
14199        } else {
14200            Bytes::new(__input)
14201        };
14202        let mut __struct = Self::default();
14203        __struct.time_usec = buf.get_u64_le()?;
14204        __struct.time_week_ms = buf.get_u32_le()?;
14205        __struct.lat = buf.get_i32_le()?;
14206        __struct.lon = buf.get_i32_le()?;
14207        __struct.alt = buf.get_f32_le()?;
14208        __struct.hdop = buf.get_f32_le()?;
14209        __struct.vdop = buf.get_f32_le()?;
14210        __struct.vn = buf.get_f32_le()?;
14211        __struct.ve = buf.get_f32_le()?;
14212        __struct.vd = buf.get_f32_le()?;
14213        __struct.speed_accuracy = buf.get_f32_le()?;
14214        __struct.horiz_accuracy = buf.get_f32_le()?;
14215        __struct.vert_accuracy = buf.get_f32_le()?;
14216        let tmp = buf.get_u16_le()?;
14217        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14218            tmp as <GpsInputIgnoreFlags as Flags>::Bits,
14219        )
14220        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14221            flag_type: "GpsInputIgnoreFlags",
14222            value: tmp as u64,
14223        })?;
14224        __struct.time_week = buf.get_u16_le()?;
14225        __struct.gps_id = buf.get_u8()?;
14226        __struct.fix_type = buf.get_u8()?;
14227        __struct.satellites_visible = buf.get_u8()?;
14228        __struct.yaw = buf.get_u16_le()?;
14229        Ok(__struct)
14230    }
14231    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14232        let mut __tmp = BytesMut::new(bytes);
14233        #[allow(clippy::absurd_extreme_comparisons)]
14234        #[allow(unused_comparisons)]
14235        if __tmp.remaining() < Self::ENCODED_LEN {
14236            panic!(
14237                "buffer is too small (need {} bytes, but got {})",
14238                Self::ENCODED_LEN,
14239                __tmp.remaining(),
14240            )
14241        }
14242        __tmp.put_u64_le(self.time_usec);
14243        __tmp.put_u32_le(self.time_week_ms);
14244        __tmp.put_i32_le(self.lat);
14245        __tmp.put_i32_le(self.lon);
14246        __tmp.put_f32_le(self.alt);
14247        __tmp.put_f32_le(self.hdop);
14248        __tmp.put_f32_le(self.vdop);
14249        __tmp.put_f32_le(self.vn);
14250        __tmp.put_f32_le(self.ve);
14251        __tmp.put_f32_le(self.vd);
14252        __tmp.put_f32_le(self.speed_accuracy);
14253        __tmp.put_f32_le(self.horiz_accuracy);
14254        __tmp.put_f32_le(self.vert_accuracy);
14255        __tmp.put_u16_le(self.ignore_flags.bits() as u16);
14256        __tmp.put_u16_le(self.time_week);
14257        __tmp.put_u8(self.gps_id);
14258        __tmp.put_u8(self.fix_type);
14259        __tmp.put_u8(self.satellites_visible);
14260        if matches!(version, MavlinkVersion::V2) {
14261            __tmp.put_u16_le(self.yaw);
14262            let len = __tmp.len();
14263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14264        } else {
14265            __tmp.len()
14266        }
14267    }
14268}
14269#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14270#[doc = ""]
14271#[doc = "ID: 24"]
14272#[derive(Debug, Clone, PartialEq)]
14273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14275#[cfg_attr(feature = "ts", derive(TS))]
14276#[cfg_attr(feature = "ts", ts(export))]
14277pub struct GPS_RAW_INT_DATA {
14278    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14279    pub time_usec: u64,
14280    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14281    pub lat: i32,
14282    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14283    pub lon: i32,
14284    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14285    pub alt: i32,
14286    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14287    pub eph: u16,
14288    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14289    pub epv: u16,
14290    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14291    pub vel: u16,
14292    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14293    pub cog: u16,
14294    #[doc = "GPS fix type."]
14295    pub fix_type: GpsFixType,
14296    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14297    pub satellites_visible: u8,
14298    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14299    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14300    pub alt_ellipsoid: i32,
14301    #[doc = "Position uncertainty."]
14302    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14303    pub h_acc: u32,
14304    #[doc = "Altitude uncertainty."]
14305    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14306    pub v_acc: u32,
14307    #[doc = "Speed uncertainty."]
14308    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14309    pub vel_acc: u32,
14310    #[doc = "Heading / track uncertainty"]
14311    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14312    pub hdg_acc: u32,
14313    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14314    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14315    pub yaw: u16,
14316}
14317impl GPS_RAW_INT_DATA {
14318    pub const ENCODED_LEN: usize = 52usize;
14319    pub const DEFAULT: Self = Self {
14320        time_usec: 0_u64,
14321        lat: 0_i32,
14322        lon: 0_i32,
14323        alt: 0_i32,
14324        eph: 0_u16,
14325        epv: 0_u16,
14326        vel: 0_u16,
14327        cog: 0_u16,
14328        fix_type: GpsFixType::DEFAULT,
14329        satellites_visible: 0_u8,
14330        alt_ellipsoid: 0_i32,
14331        h_acc: 0_u32,
14332        v_acc: 0_u32,
14333        vel_acc: 0_u32,
14334        hdg_acc: 0_u32,
14335        yaw: 0_u16,
14336    };
14337    #[cfg(feature = "arbitrary")]
14338    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14339        use arbitrary::{Arbitrary, Unstructured};
14340        let mut buf = [0u8; 1024];
14341        rng.fill_bytes(&mut buf);
14342        let mut unstructured = Unstructured::new(&buf);
14343        Self::arbitrary(&mut unstructured).unwrap_or_default()
14344    }
14345}
14346impl Default for GPS_RAW_INT_DATA {
14347    fn default() -> Self {
14348        Self::DEFAULT.clone()
14349    }
14350}
14351impl MessageData for GPS_RAW_INT_DATA {
14352    type Message = MavMessage;
14353    const ID: u32 = 24u32;
14354    const NAME: &'static str = "GPS_RAW_INT";
14355    const EXTRA_CRC: u8 = 24u8;
14356    const ENCODED_LEN: usize = 52usize;
14357    fn deser(
14358        _version: MavlinkVersion,
14359        __input: &[u8],
14360    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14361        let avail_len = __input.len();
14362        let mut payload_buf = [0; Self::ENCODED_LEN];
14363        let mut buf = if avail_len < Self::ENCODED_LEN {
14364            payload_buf[0..avail_len].copy_from_slice(__input);
14365            Bytes::new(&payload_buf)
14366        } else {
14367            Bytes::new(__input)
14368        };
14369        let mut __struct = Self::default();
14370        __struct.time_usec = buf.get_u64_le()?;
14371        __struct.lat = buf.get_i32_le()?;
14372        __struct.lon = buf.get_i32_le()?;
14373        __struct.alt = buf.get_i32_le()?;
14374        __struct.eph = buf.get_u16_le()?;
14375        __struct.epv = buf.get_u16_le()?;
14376        __struct.vel = buf.get_u16_le()?;
14377        __struct.cog = buf.get_u16_le()?;
14378        let tmp = buf.get_u8()?;
14379        __struct.fix_type =
14380            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14381                enum_type: "GpsFixType",
14382                value: tmp as u64,
14383            })?;
14384        __struct.satellites_visible = buf.get_u8()?;
14385        __struct.alt_ellipsoid = buf.get_i32_le()?;
14386        __struct.h_acc = buf.get_u32_le()?;
14387        __struct.v_acc = buf.get_u32_le()?;
14388        __struct.vel_acc = buf.get_u32_le()?;
14389        __struct.hdg_acc = buf.get_u32_le()?;
14390        __struct.yaw = buf.get_u16_le()?;
14391        Ok(__struct)
14392    }
14393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14394        let mut __tmp = BytesMut::new(bytes);
14395        #[allow(clippy::absurd_extreme_comparisons)]
14396        #[allow(unused_comparisons)]
14397        if __tmp.remaining() < Self::ENCODED_LEN {
14398            panic!(
14399                "buffer is too small (need {} bytes, but got {})",
14400                Self::ENCODED_LEN,
14401                __tmp.remaining(),
14402            )
14403        }
14404        __tmp.put_u64_le(self.time_usec);
14405        __tmp.put_i32_le(self.lat);
14406        __tmp.put_i32_le(self.lon);
14407        __tmp.put_i32_le(self.alt);
14408        __tmp.put_u16_le(self.eph);
14409        __tmp.put_u16_le(self.epv);
14410        __tmp.put_u16_le(self.vel);
14411        __tmp.put_u16_le(self.cog);
14412        __tmp.put_u8(self.fix_type as u8);
14413        __tmp.put_u8(self.satellites_visible);
14414        if matches!(version, MavlinkVersion::V2) {
14415            __tmp.put_i32_le(self.alt_ellipsoid);
14416            __tmp.put_u32_le(self.h_acc);
14417            __tmp.put_u32_le(self.v_acc);
14418            __tmp.put_u32_le(self.vel_acc);
14419            __tmp.put_u32_le(self.hdg_acc);
14420            __tmp.put_u16_le(self.yaw);
14421            let len = __tmp.len();
14422            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14423        } else {
14424            __tmp.len()
14425        }
14426    }
14427}
14428#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14429#[doc = ""]
14430#[doc = "ID: 233"]
14431#[derive(Debug, Clone, PartialEq)]
14432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14434#[cfg_attr(feature = "ts", derive(TS))]
14435#[cfg_attr(feature = "ts", ts(export))]
14436pub struct GPS_RTCM_DATA_DATA {
14437    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14438    pub flags: u8,
14439    #[doc = "data length"]
14440    pub len: u8,
14441    #[doc = "RTCM message (may be fragmented)"]
14442    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14443    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14444    pub data: [u8; 180],
14445}
14446impl GPS_RTCM_DATA_DATA {
14447    pub const ENCODED_LEN: usize = 182usize;
14448    pub const DEFAULT: Self = Self {
14449        flags: 0_u8,
14450        len: 0_u8,
14451        data: [0_u8; 180usize],
14452    };
14453    #[cfg(feature = "arbitrary")]
14454    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14455        use arbitrary::{Arbitrary, Unstructured};
14456        let mut buf = [0u8; 1024];
14457        rng.fill_bytes(&mut buf);
14458        let mut unstructured = Unstructured::new(&buf);
14459        Self::arbitrary(&mut unstructured).unwrap_or_default()
14460    }
14461}
14462impl Default for GPS_RTCM_DATA_DATA {
14463    fn default() -> Self {
14464        Self::DEFAULT.clone()
14465    }
14466}
14467impl MessageData for GPS_RTCM_DATA_DATA {
14468    type Message = MavMessage;
14469    const ID: u32 = 233u32;
14470    const NAME: &'static str = "GPS_RTCM_DATA";
14471    const EXTRA_CRC: u8 = 35u8;
14472    const ENCODED_LEN: usize = 182usize;
14473    fn deser(
14474        _version: MavlinkVersion,
14475        __input: &[u8],
14476    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14477        let avail_len = __input.len();
14478        let mut payload_buf = [0; Self::ENCODED_LEN];
14479        let mut buf = if avail_len < Self::ENCODED_LEN {
14480            payload_buf[0..avail_len].copy_from_slice(__input);
14481            Bytes::new(&payload_buf)
14482        } else {
14483            Bytes::new(__input)
14484        };
14485        let mut __struct = Self::default();
14486        __struct.flags = buf.get_u8()?;
14487        __struct.len = buf.get_u8()?;
14488        for v in &mut __struct.data {
14489            let val = buf.get_u8()?;
14490            *v = val;
14491        }
14492        Ok(__struct)
14493    }
14494    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14495        let mut __tmp = BytesMut::new(bytes);
14496        #[allow(clippy::absurd_extreme_comparisons)]
14497        #[allow(unused_comparisons)]
14498        if __tmp.remaining() < Self::ENCODED_LEN {
14499            panic!(
14500                "buffer is too small (need {} bytes, but got {})",
14501                Self::ENCODED_LEN,
14502                __tmp.remaining(),
14503            )
14504        }
14505        __tmp.put_u8(self.flags);
14506        __tmp.put_u8(self.len);
14507        for val in &self.data {
14508            __tmp.put_u8(*val);
14509        }
14510        if matches!(version, MavlinkVersion::V2) {
14511            let len = __tmp.len();
14512            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14513        } else {
14514            __tmp.len()
14515        }
14516    }
14517}
14518#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14519#[doc = ""]
14520#[doc = "ID: 127"]
14521#[derive(Debug, Clone, PartialEq)]
14522#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14523#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14524#[cfg_attr(feature = "ts", derive(TS))]
14525#[cfg_attr(feature = "ts", ts(export))]
14526pub struct GPS_RTK_DATA {
14527    #[doc = "Time since boot of last baseline message received."]
14528    pub time_last_baseline_ms: u32,
14529    #[doc = "GPS Time of Week of last baseline"]
14530    pub tow: u32,
14531    #[doc = "Current baseline in ECEF x or NED north component."]
14532    pub baseline_a_mm: i32,
14533    #[doc = "Current baseline in ECEF y or NED east component."]
14534    pub baseline_b_mm: i32,
14535    #[doc = "Current baseline in ECEF z or NED down component."]
14536    pub baseline_c_mm: i32,
14537    #[doc = "Current estimate of baseline accuracy."]
14538    pub accuracy: u32,
14539    #[doc = "Current number of integer ambiguity hypotheses."]
14540    pub iar_num_hypotheses: i32,
14541    #[doc = "GPS Week Number of last baseline"]
14542    pub wn: u16,
14543    #[doc = "Identification of connected RTK receiver."]
14544    pub rtk_receiver_id: u8,
14545    #[doc = "GPS-specific health report for RTK data."]
14546    pub rtk_health: u8,
14547    #[doc = "Rate of baseline messages being received by GPS"]
14548    pub rtk_rate: u8,
14549    #[doc = "Current number of sats used for RTK calculation."]
14550    pub nsats: u8,
14551    #[doc = "Coordinate system of baseline"]
14552    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14553}
14554impl GPS_RTK_DATA {
14555    pub const ENCODED_LEN: usize = 35usize;
14556    pub const DEFAULT: Self = Self {
14557        time_last_baseline_ms: 0_u32,
14558        tow: 0_u32,
14559        baseline_a_mm: 0_i32,
14560        baseline_b_mm: 0_i32,
14561        baseline_c_mm: 0_i32,
14562        accuracy: 0_u32,
14563        iar_num_hypotheses: 0_i32,
14564        wn: 0_u16,
14565        rtk_receiver_id: 0_u8,
14566        rtk_health: 0_u8,
14567        rtk_rate: 0_u8,
14568        nsats: 0_u8,
14569        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14570    };
14571    #[cfg(feature = "arbitrary")]
14572    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14573        use arbitrary::{Arbitrary, Unstructured};
14574        let mut buf = [0u8; 1024];
14575        rng.fill_bytes(&mut buf);
14576        let mut unstructured = Unstructured::new(&buf);
14577        Self::arbitrary(&mut unstructured).unwrap_or_default()
14578    }
14579}
14580impl Default for GPS_RTK_DATA {
14581    fn default() -> Self {
14582        Self::DEFAULT.clone()
14583    }
14584}
14585impl MessageData for GPS_RTK_DATA {
14586    type Message = MavMessage;
14587    const ID: u32 = 127u32;
14588    const NAME: &'static str = "GPS_RTK";
14589    const EXTRA_CRC: u8 = 25u8;
14590    const ENCODED_LEN: usize = 35usize;
14591    fn deser(
14592        _version: MavlinkVersion,
14593        __input: &[u8],
14594    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14595        let avail_len = __input.len();
14596        let mut payload_buf = [0; Self::ENCODED_LEN];
14597        let mut buf = if avail_len < Self::ENCODED_LEN {
14598            payload_buf[0..avail_len].copy_from_slice(__input);
14599            Bytes::new(&payload_buf)
14600        } else {
14601            Bytes::new(__input)
14602        };
14603        let mut __struct = Self::default();
14604        __struct.time_last_baseline_ms = buf.get_u32_le()?;
14605        __struct.tow = buf.get_u32_le()?;
14606        __struct.baseline_a_mm = buf.get_i32_le()?;
14607        __struct.baseline_b_mm = buf.get_i32_le()?;
14608        __struct.baseline_c_mm = buf.get_i32_le()?;
14609        __struct.accuracy = buf.get_u32_le()?;
14610        __struct.iar_num_hypotheses = buf.get_i32_le()?;
14611        __struct.wn = buf.get_u16_le()?;
14612        __struct.rtk_receiver_id = buf.get_u8()?;
14613        __struct.rtk_health = buf.get_u8()?;
14614        __struct.rtk_rate = buf.get_u8()?;
14615        __struct.nsats = buf.get_u8()?;
14616        let tmp = buf.get_u8()?;
14617        __struct.baseline_coords_type =
14618            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14619                enum_type: "RtkBaselineCoordinateSystem",
14620                value: tmp as u64,
14621            })?;
14622        Ok(__struct)
14623    }
14624    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14625        let mut __tmp = BytesMut::new(bytes);
14626        #[allow(clippy::absurd_extreme_comparisons)]
14627        #[allow(unused_comparisons)]
14628        if __tmp.remaining() < Self::ENCODED_LEN {
14629            panic!(
14630                "buffer is too small (need {} bytes, but got {})",
14631                Self::ENCODED_LEN,
14632                __tmp.remaining(),
14633            )
14634        }
14635        __tmp.put_u32_le(self.time_last_baseline_ms);
14636        __tmp.put_u32_le(self.tow);
14637        __tmp.put_i32_le(self.baseline_a_mm);
14638        __tmp.put_i32_le(self.baseline_b_mm);
14639        __tmp.put_i32_le(self.baseline_c_mm);
14640        __tmp.put_u32_le(self.accuracy);
14641        __tmp.put_i32_le(self.iar_num_hypotheses);
14642        __tmp.put_u16_le(self.wn);
14643        __tmp.put_u8(self.rtk_receiver_id);
14644        __tmp.put_u8(self.rtk_health);
14645        __tmp.put_u8(self.rtk_rate);
14646        __tmp.put_u8(self.nsats);
14647        __tmp.put_u8(self.baseline_coords_type as u8);
14648        if matches!(version, MavlinkVersion::V2) {
14649            let len = __tmp.len();
14650            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14651        } else {
14652            __tmp.len()
14653        }
14654    }
14655}
14656#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14657#[doc = ""]
14658#[doc = "ID: 25"]
14659#[derive(Debug, Clone, PartialEq)]
14660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14661#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14662#[cfg_attr(feature = "ts", derive(TS))]
14663#[cfg_attr(feature = "ts", ts(export))]
14664pub struct GPS_STATUS_DATA {
14665    #[doc = "Number of satellites visible"]
14666    pub satellites_visible: u8,
14667    #[doc = "Global satellite ID"]
14668    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14669    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14670    pub satellite_prn: [u8; 20],
14671    #[doc = "0: Satellite not used, 1: used for localization"]
14672    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14673    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14674    pub satellite_used: [u8; 20],
14675    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14676    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14677    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14678    pub satellite_elevation: [u8; 20],
14679    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14680    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14681    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14682    pub satellite_azimuth: [u8; 20],
14683    #[doc = "Signal to noise ratio of satellite"]
14684    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14685    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14686    pub satellite_snr: [u8; 20],
14687}
14688impl GPS_STATUS_DATA {
14689    pub const ENCODED_LEN: usize = 101usize;
14690    pub const DEFAULT: Self = Self {
14691        satellites_visible: 0_u8,
14692        satellite_prn: [0_u8; 20usize],
14693        satellite_used: [0_u8; 20usize],
14694        satellite_elevation: [0_u8; 20usize],
14695        satellite_azimuth: [0_u8; 20usize],
14696        satellite_snr: [0_u8; 20usize],
14697    };
14698    #[cfg(feature = "arbitrary")]
14699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14700        use arbitrary::{Arbitrary, Unstructured};
14701        let mut buf = [0u8; 1024];
14702        rng.fill_bytes(&mut buf);
14703        let mut unstructured = Unstructured::new(&buf);
14704        Self::arbitrary(&mut unstructured).unwrap_or_default()
14705    }
14706}
14707impl Default for GPS_STATUS_DATA {
14708    fn default() -> Self {
14709        Self::DEFAULT.clone()
14710    }
14711}
14712impl MessageData for GPS_STATUS_DATA {
14713    type Message = MavMessage;
14714    const ID: u32 = 25u32;
14715    const NAME: &'static str = "GPS_STATUS";
14716    const EXTRA_CRC: u8 = 23u8;
14717    const ENCODED_LEN: usize = 101usize;
14718    fn deser(
14719        _version: MavlinkVersion,
14720        __input: &[u8],
14721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14722        let avail_len = __input.len();
14723        let mut payload_buf = [0; Self::ENCODED_LEN];
14724        let mut buf = if avail_len < Self::ENCODED_LEN {
14725            payload_buf[0..avail_len].copy_from_slice(__input);
14726            Bytes::new(&payload_buf)
14727        } else {
14728            Bytes::new(__input)
14729        };
14730        let mut __struct = Self::default();
14731        __struct.satellites_visible = buf.get_u8()?;
14732        for v in &mut __struct.satellite_prn {
14733            let val = buf.get_u8()?;
14734            *v = val;
14735        }
14736        for v in &mut __struct.satellite_used {
14737            let val = buf.get_u8()?;
14738            *v = val;
14739        }
14740        for v in &mut __struct.satellite_elevation {
14741            let val = buf.get_u8()?;
14742            *v = val;
14743        }
14744        for v in &mut __struct.satellite_azimuth {
14745            let val = buf.get_u8()?;
14746            *v = val;
14747        }
14748        for v in &mut __struct.satellite_snr {
14749            let val = buf.get_u8()?;
14750            *v = val;
14751        }
14752        Ok(__struct)
14753    }
14754    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14755        let mut __tmp = BytesMut::new(bytes);
14756        #[allow(clippy::absurd_extreme_comparisons)]
14757        #[allow(unused_comparisons)]
14758        if __tmp.remaining() < Self::ENCODED_LEN {
14759            panic!(
14760                "buffer is too small (need {} bytes, but got {})",
14761                Self::ENCODED_LEN,
14762                __tmp.remaining(),
14763            )
14764        }
14765        __tmp.put_u8(self.satellites_visible);
14766        for val in &self.satellite_prn {
14767            __tmp.put_u8(*val);
14768        }
14769        for val in &self.satellite_used {
14770            __tmp.put_u8(*val);
14771        }
14772        for val in &self.satellite_elevation {
14773            __tmp.put_u8(*val);
14774        }
14775        for val in &self.satellite_azimuth {
14776            __tmp.put_u8(*val);
14777        }
14778        for val in &self.satellite_snr {
14779            __tmp.put_u8(*val);
14780        }
14781        if matches!(version, MavlinkVersion::V2) {
14782            let len = __tmp.len();
14783            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14784        } else {
14785            __tmp.len()
14786        }
14787    }
14788}
14789#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
14790#[doc = ""]
14791#[doc = "ID: 0"]
14792#[derive(Debug, Clone, PartialEq)]
14793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14795#[cfg_attr(feature = "ts", derive(TS))]
14796#[cfg_attr(feature = "ts", ts(export))]
14797pub struct HEARTBEAT_DATA {
14798    #[doc = "A bitfield for use for autopilot-specific flags"]
14799    pub custom_mode: u32,
14800    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
14801    pub mavtype: MavType,
14802    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14803    pub autopilot: MavAutopilot,
14804    #[doc = "System mode bitmap."]
14805    pub base_mode: MavModeFlag,
14806    #[doc = "System status flag."]
14807    pub system_status: MavState,
14808    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
14809    pub mavlink_version: u8,
14810}
14811impl HEARTBEAT_DATA {
14812    pub const ENCODED_LEN: usize = 9usize;
14813    pub const DEFAULT: Self = Self {
14814        custom_mode: 0_u32,
14815        mavtype: MavType::DEFAULT,
14816        autopilot: MavAutopilot::DEFAULT,
14817        base_mode: MavModeFlag::DEFAULT,
14818        system_status: MavState::DEFAULT,
14819        mavlink_version: MINOR_MAVLINK_VERSION,
14820    };
14821    #[cfg(feature = "arbitrary")]
14822    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14823        use arbitrary::{Arbitrary, Unstructured};
14824        let mut buf = [0u8; 1024];
14825        rng.fill_bytes(&mut buf);
14826        let mut unstructured = Unstructured::new(&buf);
14827        Self::arbitrary(&mut unstructured).unwrap_or_default()
14828    }
14829}
14830impl Default for HEARTBEAT_DATA {
14831    fn default() -> Self {
14832        Self::DEFAULT.clone()
14833    }
14834}
14835impl MessageData for HEARTBEAT_DATA {
14836    type Message = MavMessage;
14837    const ID: u32 = 0u32;
14838    const NAME: &'static str = "HEARTBEAT";
14839    const EXTRA_CRC: u8 = 50u8;
14840    const ENCODED_LEN: usize = 9usize;
14841    fn deser(
14842        _version: MavlinkVersion,
14843        __input: &[u8],
14844    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14845        let avail_len = __input.len();
14846        let mut payload_buf = [0; Self::ENCODED_LEN];
14847        let mut buf = if avail_len < Self::ENCODED_LEN {
14848            payload_buf[0..avail_len].copy_from_slice(__input);
14849            Bytes::new(&payload_buf)
14850        } else {
14851            Bytes::new(__input)
14852        };
14853        let mut __struct = Self::default();
14854        __struct.custom_mode = buf.get_u32_le()?;
14855        let tmp = buf.get_u8()?;
14856        __struct.mavtype =
14857            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14858                enum_type: "MavType",
14859                value: tmp as u64,
14860            })?;
14861        let tmp = buf.get_u8()?;
14862        __struct.autopilot =
14863            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14864                enum_type: "MavAutopilot",
14865                value: tmp as u64,
14866            })?;
14867        let tmp = buf.get_u8()?;
14868        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
14869            ::mavlink_core::error::ParserError::InvalidFlag {
14870                flag_type: "MavModeFlag",
14871                value: tmp as u64,
14872            },
14873        )?;
14874        let tmp = buf.get_u8()?;
14875        __struct.system_status =
14876            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14877                enum_type: "MavState",
14878                value: tmp as u64,
14879            })?;
14880        __struct.mavlink_version = buf.get_u8()?;
14881        Ok(__struct)
14882    }
14883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14884        let mut __tmp = BytesMut::new(bytes);
14885        #[allow(clippy::absurd_extreme_comparisons)]
14886        #[allow(unused_comparisons)]
14887        if __tmp.remaining() < Self::ENCODED_LEN {
14888            panic!(
14889                "buffer is too small (need {} bytes, but got {})",
14890                Self::ENCODED_LEN,
14891                __tmp.remaining(),
14892            )
14893        }
14894        __tmp.put_u32_le(self.custom_mode);
14895        __tmp.put_u8(self.mavtype as u8);
14896        __tmp.put_u8(self.autopilot as u8);
14897        __tmp.put_u8(self.base_mode.bits() as u8);
14898        __tmp.put_u8(self.system_status as u8);
14899        __tmp.put_u8(self.mavlink_version);
14900        if matches!(version, MavlinkVersion::V2) {
14901            let len = __tmp.len();
14902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14903        } else {
14904            __tmp.len()
14905        }
14906    }
14907}
14908#[doc = "The IMU readings in SI units in NED body frame."]
14909#[doc = ""]
14910#[doc = "ID: 105"]
14911#[derive(Debug, Clone, PartialEq)]
14912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14914#[cfg_attr(feature = "ts", derive(TS))]
14915#[cfg_attr(feature = "ts", ts(export))]
14916pub struct HIGHRES_IMU_DATA {
14917    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14918    pub time_usec: u64,
14919    #[doc = "X acceleration"]
14920    pub xacc: f32,
14921    #[doc = "Y acceleration"]
14922    pub yacc: f32,
14923    #[doc = "Z acceleration"]
14924    pub zacc: f32,
14925    #[doc = "Angular speed around X axis"]
14926    pub xgyro: f32,
14927    #[doc = "Angular speed around Y axis"]
14928    pub ygyro: f32,
14929    #[doc = "Angular speed around Z axis"]
14930    pub zgyro: f32,
14931    #[doc = "X Magnetic field"]
14932    pub xmag: f32,
14933    #[doc = "Y Magnetic field"]
14934    pub ymag: f32,
14935    #[doc = "Z Magnetic field"]
14936    pub zmag: f32,
14937    #[doc = "Absolute pressure"]
14938    pub abs_pressure: f32,
14939    #[doc = "Differential pressure"]
14940    pub diff_pressure: f32,
14941    #[doc = "Altitude calculated from pressure"]
14942    pub pressure_alt: f32,
14943    #[doc = "Temperature"]
14944    pub temperature: f32,
14945    #[doc = "Bitmap for fields that have updated since last message"]
14946    pub fields_updated: HighresImuUpdatedFlags,
14947    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
14948    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14949    pub id: u8,
14950}
14951impl HIGHRES_IMU_DATA {
14952    pub const ENCODED_LEN: usize = 63usize;
14953    pub const DEFAULT: Self = Self {
14954        time_usec: 0_u64,
14955        xacc: 0.0_f32,
14956        yacc: 0.0_f32,
14957        zacc: 0.0_f32,
14958        xgyro: 0.0_f32,
14959        ygyro: 0.0_f32,
14960        zgyro: 0.0_f32,
14961        xmag: 0.0_f32,
14962        ymag: 0.0_f32,
14963        zmag: 0.0_f32,
14964        abs_pressure: 0.0_f32,
14965        diff_pressure: 0.0_f32,
14966        pressure_alt: 0.0_f32,
14967        temperature: 0.0_f32,
14968        fields_updated: HighresImuUpdatedFlags::DEFAULT,
14969        id: 0_u8,
14970    };
14971    #[cfg(feature = "arbitrary")]
14972    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14973        use arbitrary::{Arbitrary, Unstructured};
14974        let mut buf = [0u8; 1024];
14975        rng.fill_bytes(&mut buf);
14976        let mut unstructured = Unstructured::new(&buf);
14977        Self::arbitrary(&mut unstructured).unwrap_or_default()
14978    }
14979}
14980impl Default for HIGHRES_IMU_DATA {
14981    fn default() -> Self {
14982        Self::DEFAULT.clone()
14983    }
14984}
14985impl MessageData for HIGHRES_IMU_DATA {
14986    type Message = MavMessage;
14987    const ID: u32 = 105u32;
14988    const NAME: &'static str = "HIGHRES_IMU";
14989    const EXTRA_CRC: u8 = 93u8;
14990    const ENCODED_LEN: usize = 63usize;
14991    fn deser(
14992        _version: MavlinkVersion,
14993        __input: &[u8],
14994    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14995        let avail_len = __input.len();
14996        let mut payload_buf = [0; Self::ENCODED_LEN];
14997        let mut buf = if avail_len < Self::ENCODED_LEN {
14998            payload_buf[0..avail_len].copy_from_slice(__input);
14999            Bytes::new(&payload_buf)
15000        } else {
15001            Bytes::new(__input)
15002        };
15003        let mut __struct = Self::default();
15004        __struct.time_usec = buf.get_u64_le()?;
15005        __struct.xacc = buf.get_f32_le()?;
15006        __struct.yacc = buf.get_f32_le()?;
15007        __struct.zacc = buf.get_f32_le()?;
15008        __struct.xgyro = buf.get_f32_le()?;
15009        __struct.ygyro = buf.get_f32_le()?;
15010        __struct.zgyro = buf.get_f32_le()?;
15011        __struct.xmag = buf.get_f32_le()?;
15012        __struct.ymag = buf.get_f32_le()?;
15013        __struct.zmag = buf.get_f32_le()?;
15014        __struct.abs_pressure = buf.get_f32_le()?;
15015        __struct.diff_pressure = buf.get_f32_le()?;
15016        __struct.pressure_alt = buf.get_f32_le()?;
15017        __struct.temperature = buf.get_f32_le()?;
15018        let tmp = buf.get_u16_le()?;
15019        __struct.fields_updated =
15020            HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
15021                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15022                    flag_type: "HighresImuUpdatedFlags",
15023                    value: tmp as u64,
15024                })?;
15025        __struct.id = buf.get_u8()?;
15026        Ok(__struct)
15027    }
15028    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15029        let mut __tmp = BytesMut::new(bytes);
15030        #[allow(clippy::absurd_extreme_comparisons)]
15031        #[allow(unused_comparisons)]
15032        if __tmp.remaining() < Self::ENCODED_LEN {
15033            panic!(
15034                "buffer is too small (need {} bytes, but got {})",
15035                Self::ENCODED_LEN,
15036                __tmp.remaining(),
15037            )
15038        }
15039        __tmp.put_u64_le(self.time_usec);
15040        __tmp.put_f32_le(self.xacc);
15041        __tmp.put_f32_le(self.yacc);
15042        __tmp.put_f32_le(self.zacc);
15043        __tmp.put_f32_le(self.xgyro);
15044        __tmp.put_f32_le(self.ygyro);
15045        __tmp.put_f32_le(self.zgyro);
15046        __tmp.put_f32_le(self.xmag);
15047        __tmp.put_f32_le(self.ymag);
15048        __tmp.put_f32_le(self.zmag);
15049        __tmp.put_f32_le(self.abs_pressure);
15050        __tmp.put_f32_le(self.diff_pressure);
15051        __tmp.put_f32_le(self.pressure_alt);
15052        __tmp.put_f32_le(self.temperature);
15053        __tmp.put_u16_le(self.fields_updated.bits() as u16);
15054        if matches!(version, MavlinkVersion::V2) {
15055            __tmp.put_u8(self.id);
15056            let len = __tmp.len();
15057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15058        } else {
15059            __tmp.len()
15060        }
15061    }
15062}
15063#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15064#[doc = "Message appropriate for high latency connections like Iridium."]
15065#[doc = ""]
15066#[doc = "ID: 234"]
15067#[derive(Debug, Clone, PartialEq)]
15068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15070#[cfg_attr(feature = "ts", derive(TS))]
15071#[cfg_attr(feature = "ts", ts(export))]
15072pub struct HIGH_LATENCY_DATA {
15073    #[doc = "A bitfield for use for autopilot-specific flags."]
15074    pub custom_mode: u32,
15075    #[doc = "Latitude"]
15076    pub latitude: i32,
15077    #[doc = "Longitude"]
15078    pub longitude: i32,
15079    #[doc = "roll"]
15080    pub roll: i16,
15081    #[doc = "pitch"]
15082    pub pitch: i16,
15083    #[doc = "heading"]
15084    pub heading: u16,
15085    #[doc = "heading setpoint"]
15086    pub heading_sp: i16,
15087    #[doc = "Altitude above mean sea level"]
15088    pub altitude_amsl: i16,
15089    #[doc = "Altitude setpoint relative to the home position"]
15090    pub altitude_sp: i16,
15091    #[doc = "distance to target"]
15092    pub wp_distance: u16,
15093    #[doc = "Bitmap of enabled system modes."]
15094    pub base_mode: MavModeFlag,
15095    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15096    pub landed_state: MavLandedState,
15097    #[doc = "throttle (percentage)"]
15098    pub throttle: i8,
15099    #[doc = "airspeed"]
15100    pub airspeed: u8,
15101    #[doc = "airspeed setpoint"]
15102    pub airspeed_sp: u8,
15103    #[doc = "groundspeed"]
15104    pub groundspeed: u8,
15105    #[doc = "climb rate"]
15106    pub climb_rate: i8,
15107    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15108    pub gps_nsat: u8,
15109    #[doc = "GPS Fix type."]
15110    pub gps_fix_type: GpsFixType,
15111    #[doc = "Remaining battery (percentage)"]
15112    pub battery_remaining: u8,
15113    #[doc = "Autopilot temperature (degrees C)"]
15114    pub temperature: i8,
15115    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15116    pub temperature_air: i8,
15117    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15118    pub failsafe: u8,
15119    #[doc = "current waypoint number"]
15120    pub wp_num: u8,
15121}
15122impl HIGH_LATENCY_DATA {
15123    pub const ENCODED_LEN: usize = 40usize;
15124    pub const DEFAULT: Self = Self {
15125        custom_mode: 0_u32,
15126        latitude: 0_i32,
15127        longitude: 0_i32,
15128        roll: 0_i16,
15129        pitch: 0_i16,
15130        heading: 0_u16,
15131        heading_sp: 0_i16,
15132        altitude_amsl: 0_i16,
15133        altitude_sp: 0_i16,
15134        wp_distance: 0_u16,
15135        base_mode: MavModeFlag::DEFAULT,
15136        landed_state: MavLandedState::DEFAULT,
15137        throttle: 0_i8,
15138        airspeed: 0_u8,
15139        airspeed_sp: 0_u8,
15140        groundspeed: 0_u8,
15141        climb_rate: 0_i8,
15142        gps_nsat: 0_u8,
15143        gps_fix_type: GpsFixType::DEFAULT,
15144        battery_remaining: 0_u8,
15145        temperature: 0_i8,
15146        temperature_air: 0_i8,
15147        failsafe: 0_u8,
15148        wp_num: 0_u8,
15149    };
15150    #[cfg(feature = "arbitrary")]
15151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15152        use arbitrary::{Arbitrary, Unstructured};
15153        let mut buf = [0u8; 1024];
15154        rng.fill_bytes(&mut buf);
15155        let mut unstructured = Unstructured::new(&buf);
15156        Self::arbitrary(&mut unstructured).unwrap_or_default()
15157    }
15158}
15159impl Default for HIGH_LATENCY_DATA {
15160    fn default() -> Self {
15161        Self::DEFAULT.clone()
15162    }
15163}
15164impl MessageData for HIGH_LATENCY_DATA {
15165    type Message = MavMessage;
15166    const ID: u32 = 234u32;
15167    const NAME: &'static str = "HIGH_LATENCY";
15168    const EXTRA_CRC: u8 = 150u8;
15169    const ENCODED_LEN: usize = 40usize;
15170    fn deser(
15171        _version: MavlinkVersion,
15172        __input: &[u8],
15173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15174        let avail_len = __input.len();
15175        let mut payload_buf = [0; Self::ENCODED_LEN];
15176        let mut buf = if avail_len < Self::ENCODED_LEN {
15177            payload_buf[0..avail_len].copy_from_slice(__input);
15178            Bytes::new(&payload_buf)
15179        } else {
15180            Bytes::new(__input)
15181        };
15182        let mut __struct = Self::default();
15183        __struct.custom_mode = buf.get_u32_le()?;
15184        __struct.latitude = buf.get_i32_le()?;
15185        __struct.longitude = buf.get_i32_le()?;
15186        __struct.roll = buf.get_i16_le()?;
15187        __struct.pitch = buf.get_i16_le()?;
15188        __struct.heading = buf.get_u16_le()?;
15189        __struct.heading_sp = buf.get_i16_le()?;
15190        __struct.altitude_amsl = buf.get_i16_le()?;
15191        __struct.altitude_sp = buf.get_i16_le()?;
15192        __struct.wp_distance = buf.get_u16_le()?;
15193        let tmp = buf.get_u8()?;
15194        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15195            ::mavlink_core::error::ParserError::InvalidFlag {
15196                flag_type: "MavModeFlag",
15197                value: tmp as u64,
15198            },
15199        )?;
15200        let tmp = buf.get_u8()?;
15201        __struct.landed_state =
15202            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15203                enum_type: "MavLandedState",
15204                value: tmp as u64,
15205            })?;
15206        __struct.throttle = buf.get_i8()?;
15207        __struct.airspeed = buf.get_u8()?;
15208        __struct.airspeed_sp = buf.get_u8()?;
15209        __struct.groundspeed = buf.get_u8()?;
15210        __struct.climb_rate = buf.get_i8()?;
15211        __struct.gps_nsat = buf.get_u8()?;
15212        let tmp = buf.get_u8()?;
15213        __struct.gps_fix_type =
15214            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15215                enum_type: "GpsFixType",
15216                value: tmp as u64,
15217            })?;
15218        __struct.battery_remaining = buf.get_u8()?;
15219        __struct.temperature = buf.get_i8()?;
15220        __struct.temperature_air = buf.get_i8()?;
15221        __struct.failsafe = buf.get_u8()?;
15222        __struct.wp_num = buf.get_u8()?;
15223        Ok(__struct)
15224    }
15225    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15226        let mut __tmp = BytesMut::new(bytes);
15227        #[allow(clippy::absurd_extreme_comparisons)]
15228        #[allow(unused_comparisons)]
15229        if __tmp.remaining() < Self::ENCODED_LEN {
15230            panic!(
15231                "buffer is too small (need {} bytes, but got {})",
15232                Self::ENCODED_LEN,
15233                __tmp.remaining(),
15234            )
15235        }
15236        __tmp.put_u32_le(self.custom_mode);
15237        __tmp.put_i32_le(self.latitude);
15238        __tmp.put_i32_le(self.longitude);
15239        __tmp.put_i16_le(self.roll);
15240        __tmp.put_i16_le(self.pitch);
15241        __tmp.put_u16_le(self.heading);
15242        __tmp.put_i16_le(self.heading_sp);
15243        __tmp.put_i16_le(self.altitude_amsl);
15244        __tmp.put_i16_le(self.altitude_sp);
15245        __tmp.put_u16_le(self.wp_distance);
15246        __tmp.put_u8(self.base_mode.bits() as u8);
15247        __tmp.put_u8(self.landed_state as u8);
15248        __tmp.put_i8(self.throttle);
15249        __tmp.put_u8(self.airspeed);
15250        __tmp.put_u8(self.airspeed_sp);
15251        __tmp.put_u8(self.groundspeed);
15252        __tmp.put_i8(self.climb_rate);
15253        __tmp.put_u8(self.gps_nsat);
15254        __tmp.put_u8(self.gps_fix_type as u8);
15255        __tmp.put_u8(self.battery_remaining);
15256        __tmp.put_i8(self.temperature);
15257        __tmp.put_i8(self.temperature_air);
15258        __tmp.put_u8(self.failsafe);
15259        __tmp.put_u8(self.wp_num);
15260        if matches!(version, MavlinkVersion::V2) {
15261            let len = __tmp.len();
15262            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15263        } else {
15264            __tmp.len()
15265        }
15266    }
15267}
15268#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15269#[doc = ""]
15270#[doc = "ID: 235"]
15271#[derive(Debug, Clone, PartialEq)]
15272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15274#[cfg_attr(feature = "ts", derive(TS))]
15275#[cfg_attr(feature = "ts", ts(export))]
15276pub struct HIGH_LATENCY2_DATA {
15277    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15278    pub timestamp: u32,
15279    #[doc = "Latitude"]
15280    pub latitude: i32,
15281    #[doc = "Longitude"]
15282    pub longitude: i32,
15283    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15284    pub custom_mode: u16,
15285    #[doc = "Altitude above mean sea level"]
15286    pub altitude: i16,
15287    #[doc = "Altitude setpoint"]
15288    pub target_altitude: i16,
15289    #[doc = "Distance to target waypoint or position"]
15290    pub target_distance: u16,
15291    #[doc = "Current waypoint number"]
15292    pub wp_num: u16,
15293    #[doc = "Bitmap of failure flags."]
15294    pub failure_flags: HlFailureFlag,
15295    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15296    pub mavtype: MavType,
15297    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15298    pub autopilot: MavAutopilot,
15299    #[doc = "Heading"]
15300    pub heading: u8,
15301    #[doc = "Heading setpoint"]
15302    pub target_heading: u8,
15303    #[doc = "Throttle"]
15304    pub throttle: u8,
15305    #[doc = "Airspeed"]
15306    pub airspeed: u8,
15307    #[doc = "Airspeed setpoint"]
15308    pub airspeed_sp: u8,
15309    #[doc = "Groundspeed"]
15310    pub groundspeed: u8,
15311    #[doc = "Windspeed"]
15312    pub windspeed: u8,
15313    #[doc = "Wind heading"]
15314    pub wind_heading: u8,
15315    #[doc = "Maximum error horizontal position since last message"]
15316    pub eph: u8,
15317    #[doc = "Maximum error vertical position since last message"]
15318    pub epv: u8,
15319    #[doc = "Air temperature"]
15320    pub temperature_air: i8,
15321    #[doc = "Maximum climb rate magnitude since last message"]
15322    pub climb_rate: i8,
15323    #[doc = "Battery level (-1 if field not provided)."]
15324    pub battery: i8,
15325    #[doc = "Field for custom payload."]
15326    pub custom0: i8,
15327    #[doc = "Field for custom payload."]
15328    pub custom1: i8,
15329    #[doc = "Field for custom payload."]
15330    pub custom2: i8,
15331}
15332impl HIGH_LATENCY2_DATA {
15333    pub const ENCODED_LEN: usize = 42usize;
15334    pub const DEFAULT: Self = Self {
15335        timestamp: 0_u32,
15336        latitude: 0_i32,
15337        longitude: 0_i32,
15338        custom_mode: 0_u16,
15339        altitude: 0_i16,
15340        target_altitude: 0_i16,
15341        target_distance: 0_u16,
15342        wp_num: 0_u16,
15343        failure_flags: HlFailureFlag::DEFAULT,
15344        mavtype: MavType::DEFAULT,
15345        autopilot: MavAutopilot::DEFAULT,
15346        heading: 0_u8,
15347        target_heading: 0_u8,
15348        throttle: 0_u8,
15349        airspeed: 0_u8,
15350        airspeed_sp: 0_u8,
15351        groundspeed: 0_u8,
15352        windspeed: 0_u8,
15353        wind_heading: 0_u8,
15354        eph: 0_u8,
15355        epv: 0_u8,
15356        temperature_air: 0_i8,
15357        climb_rate: 0_i8,
15358        battery: 0_i8,
15359        custom0: 0_i8,
15360        custom1: 0_i8,
15361        custom2: 0_i8,
15362    };
15363    #[cfg(feature = "arbitrary")]
15364    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15365        use arbitrary::{Arbitrary, Unstructured};
15366        let mut buf = [0u8; 1024];
15367        rng.fill_bytes(&mut buf);
15368        let mut unstructured = Unstructured::new(&buf);
15369        Self::arbitrary(&mut unstructured).unwrap_or_default()
15370    }
15371}
15372impl Default for HIGH_LATENCY2_DATA {
15373    fn default() -> Self {
15374        Self::DEFAULT.clone()
15375    }
15376}
15377impl MessageData for HIGH_LATENCY2_DATA {
15378    type Message = MavMessage;
15379    const ID: u32 = 235u32;
15380    const NAME: &'static str = "HIGH_LATENCY2";
15381    const EXTRA_CRC: u8 = 179u8;
15382    const ENCODED_LEN: usize = 42usize;
15383    fn deser(
15384        _version: MavlinkVersion,
15385        __input: &[u8],
15386    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15387        let avail_len = __input.len();
15388        let mut payload_buf = [0; Self::ENCODED_LEN];
15389        let mut buf = if avail_len < Self::ENCODED_LEN {
15390            payload_buf[0..avail_len].copy_from_slice(__input);
15391            Bytes::new(&payload_buf)
15392        } else {
15393            Bytes::new(__input)
15394        };
15395        let mut __struct = Self::default();
15396        __struct.timestamp = buf.get_u32_le()?;
15397        __struct.latitude = buf.get_i32_le()?;
15398        __struct.longitude = buf.get_i32_le()?;
15399        __struct.custom_mode = buf.get_u16_le()?;
15400        __struct.altitude = buf.get_i16_le()?;
15401        __struct.target_altitude = buf.get_i16_le()?;
15402        __struct.target_distance = buf.get_u16_le()?;
15403        __struct.wp_num = buf.get_u16_le()?;
15404        let tmp = buf.get_u16_le()?;
15405        __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
15406            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15407                flag_type: "HlFailureFlag",
15408                value: tmp as u64,
15409            })?;
15410        let tmp = buf.get_u8()?;
15411        __struct.mavtype =
15412            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15413                enum_type: "MavType",
15414                value: tmp as u64,
15415            })?;
15416        let tmp = buf.get_u8()?;
15417        __struct.autopilot =
15418            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15419                enum_type: "MavAutopilot",
15420                value: tmp as u64,
15421            })?;
15422        __struct.heading = buf.get_u8()?;
15423        __struct.target_heading = buf.get_u8()?;
15424        __struct.throttle = buf.get_u8()?;
15425        __struct.airspeed = buf.get_u8()?;
15426        __struct.airspeed_sp = buf.get_u8()?;
15427        __struct.groundspeed = buf.get_u8()?;
15428        __struct.windspeed = buf.get_u8()?;
15429        __struct.wind_heading = buf.get_u8()?;
15430        __struct.eph = buf.get_u8()?;
15431        __struct.epv = buf.get_u8()?;
15432        __struct.temperature_air = buf.get_i8()?;
15433        __struct.climb_rate = buf.get_i8()?;
15434        __struct.battery = buf.get_i8()?;
15435        __struct.custom0 = buf.get_i8()?;
15436        __struct.custom1 = buf.get_i8()?;
15437        __struct.custom2 = buf.get_i8()?;
15438        Ok(__struct)
15439    }
15440    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15441        let mut __tmp = BytesMut::new(bytes);
15442        #[allow(clippy::absurd_extreme_comparisons)]
15443        #[allow(unused_comparisons)]
15444        if __tmp.remaining() < Self::ENCODED_LEN {
15445            panic!(
15446                "buffer is too small (need {} bytes, but got {})",
15447                Self::ENCODED_LEN,
15448                __tmp.remaining(),
15449            )
15450        }
15451        __tmp.put_u32_le(self.timestamp);
15452        __tmp.put_i32_le(self.latitude);
15453        __tmp.put_i32_le(self.longitude);
15454        __tmp.put_u16_le(self.custom_mode);
15455        __tmp.put_i16_le(self.altitude);
15456        __tmp.put_i16_le(self.target_altitude);
15457        __tmp.put_u16_le(self.target_distance);
15458        __tmp.put_u16_le(self.wp_num);
15459        __tmp.put_u16_le(self.failure_flags.bits() as u16);
15460        __tmp.put_u8(self.mavtype as u8);
15461        __tmp.put_u8(self.autopilot as u8);
15462        __tmp.put_u8(self.heading);
15463        __tmp.put_u8(self.target_heading);
15464        __tmp.put_u8(self.throttle);
15465        __tmp.put_u8(self.airspeed);
15466        __tmp.put_u8(self.airspeed_sp);
15467        __tmp.put_u8(self.groundspeed);
15468        __tmp.put_u8(self.windspeed);
15469        __tmp.put_u8(self.wind_heading);
15470        __tmp.put_u8(self.eph);
15471        __tmp.put_u8(self.epv);
15472        __tmp.put_i8(self.temperature_air);
15473        __tmp.put_i8(self.climb_rate);
15474        __tmp.put_i8(self.battery);
15475        __tmp.put_i8(self.custom0);
15476        __tmp.put_i8(self.custom1);
15477        __tmp.put_i8(self.custom2);
15478        if matches!(version, MavlinkVersion::V2) {
15479            let len = __tmp.len();
15480            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15481        } else {
15482            __tmp.len()
15483        }
15484    }
15485}
15486#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15487#[doc = ""]
15488#[doc = "ID: 93"]
15489#[derive(Debug, Clone, PartialEq)]
15490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15491#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15492#[cfg_attr(feature = "ts", derive(TS))]
15493#[cfg_attr(feature = "ts", ts(export))]
15494pub struct HIL_ACTUATOR_CONTROLS_DATA {
15495    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15496    pub time_usec: u64,
15497    #[doc = "Flags bitmask."]
15498    pub flags: HilActuatorControlsFlags,
15499    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15500    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15501    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15502    pub controls: [f32; 16],
15503    #[doc = "System mode. Includes arming state."]
15504    pub mode: MavModeFlag,
15505}
15506impl HIL_ACTUATOR_CONTROLS_DATA {
15507    pub const ENCODED_LEN: usize = 81usize;
15508    pub const DEFAULT: Self = Self {
15509        time_usec: 0_u64,
15510        flags: HilActuatorControlsFlags::DEFAULT,
15511        controls: [0.0_f32; 16usize],
15512        mode: MavModeFlag::DEFAULT,
15513    };
15514    #[cfg(feature = "arbitrary")]
15515    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15516        use arbitrary::{Arbitrary, Unstructured};
15517        let mut buf = [0u8; 1024];
15518        rng.fill_bytes(&mut buf);
15519        let mut unstructured = Unstructured::new(&buf);
15520        Self::arbitrary(&mut unstructured).unwrap_or_default()
15521    }
15522}
15523impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15524    fn default() -> Self {
15525        Self::DEFAULT.clone()
15526    }
15527}
15528impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15529    type Message = MavMessage;
15530    const ID: u32 = 93u32;
15531    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15532    const EXTRA_CRC: u8 = 47u8;
15533    const ENCODED_LEN: usize = 81usize;
15534    fn deser(
15535        _version: MavlinkVersion,
15536        __input: &[u8],
15537    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15538        let avail_len = __input.len();
15539        let mut payload_buf = [0; Self::ENCODED_LEN];
15540        let mut buf = if avail_len < Self::ENCODED_LEN {
15541            payload_buf[0..avail_len].copy_from_slice(__input);
15542            Bytes::new(&payload_buf)
15543        } else {
15544            Bytes::new(__input)
15545        };
15546        let mut __struct = Self::default();
15547        __struct.time_usec = buf.get_u64_le()?;
15548        let tmp = buf.get_u64_le()?;
15549        __struct.flags =
15550            HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
15551                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15552                flag_type: "HilActuatorControlsFlags",
15553                value: tmp as u64,
15554            })?;
15555        for v in &mut __struct.controls {
15556            let val = buf.get_f32_le()?;
15557            *v = val;
15558        }
15559        let tmp = buf.get_u8()?;
15560        __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15561            ::mavlink_core::error::ParserError::InvalidFlag {
15562                flag_type: "MavModeFlag",
15563                value: tmp as u64,
15564            },
15565        )?;
15566        Ok(__struct)
15567    }
15568    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15569        let mut __tmp = BytesMut::new(bytes);
15570        #[allow(clippy::absurd_extreme_comparisons)]
15571        #[allow(unused_comparisons)]
15572        if __tmp.remaining() < Self::ENCODED_LEN {
15573            panic!(
15574                "buffer is too small (need {} bytes, but got {})",
15575                Self::ENCODED_LEN,
15576                __tmp.remaining(),
15577            )
15578        }
15579        __tmp.put_u64_le(self.time_usec);
15580        __tmp.put_u64_le(self.flags.bits() as u64);
15581        for val in &self.controls {
15582            __tmp.put_f32_le(*val);
15583        }
15584        __tmp.put_u8(self.mode.bits() as u8);
15585        if matches!(version, MavlinkVersion::V2) {
15586            let len = __tmp.len();
15587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15588        } else {
15589            __tmp.len()
15590        }
15591    }
15592}
15593#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15594#[doc = ""]
15595#[doc = "ID: 91"]
15596#[derive(Debug, Clone, PartialEq)]
15597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15599#[cfg_attr(feature = "ts", derive(TS))]
15600#[cfg_attr(feature = "ts", ts(export))]
15601pub struct HIL_CONTROLS_DATA {
15602    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15603    pub time_usec: u64,
15604    #[doc = "Control output -1 .. 1"]
15605    pub roll_ailerons: f32,
15606    #[doc = "Control output -1 .. 1"]
15607    pub pitch_elevator: f32,
15608    #[doc = "Control output -1 .. 1"]
15609    pub yaw_rudder: f32,
15610    #[doc = "Throttle 0 .. 1"]
15611    pub throttle: f32,
15612    #[doc = "Aux 1, -1 .. 1"]
15613    pub aux1: f32,
15614    #[doc = "Aux 2, -1 .. 1"]
15615    pub aux2: f32,
15616    #[doc = "Aux 3, -1 .. 1"]
15617    pub aux3: f32,
15618    #[doc = "Aux 4, -1 .. 1"]
15619    pub aux4: f32,
15620    #[doc = "System mode."]
15621    pub mode: MavMode,
15622    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15623    pub nav_mode: u8,
15624}
15625impl HIL_CONTROLS_DATA {
15626    pub const ENCODED_LEN: usize = 42usize;
15627    pub const DEFAULT: Self = Self {
15628        time_usec: 0_u64,
15629        roll_ailerons: 0.0_f32,
15630        pitch_elevator: 0.0_f32,
15631        yaw_rudder: 0.0_f32,
15632        throttle: 0.0_f32,
15633        aux1: 0.0_f32,
15634        aux2: 0.0_f32,
15635        aux3: 0.0_f32,
15636        aux4: 0.0_f32,
15637        mode: MavMode::DEFAULT,
15638        nav_mode: 0_u8,
15639    };
15640    #[cfg(feature = "arbitrary")]
15641    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15642        use arbitrary::{Arbitrary, Unstructured};
15643        let mut buf = [0u8; 1024];
15644        rng.fill_bytes(&mut buf);
15645        let mut unstructured = Unstructured::new(&buf);
15646        Self::arbitrary(&mut unstructured).unwrap_or_default()
15647    }
15648}
15649impl Default for HIL_CONTROLS_DATA {
15650    fn default() -> Self {
15651        Self::DEFAULT.clone()
15652    }
15653}
15654impl MessageData for HIL_CONTROLS_DATA {
15655    type Message = MavMessage;
15656    const ID: u32 = 91u32;
15657    const NAME: &'static str = "HIL_CONTROLS";
15658    const EXTRA_CRC: u8 = 63u8;
15659    const ENCODED_LEN: usize = 42usize;
15660    fn deser(
15661        _version: MavlinkVersion,
15662        __input: &[u8],
15663    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15664        let avail_len = __input.len();
15665        let mut payload_buf = [0; Self::ENCODED_LEN];
15666        let mut buf = if avail_len < Self::ENCODED_LEN {
15667            payload_buf[0..avail_len].copy_from_slice(__input);
15668            Bytes::new(&payload_buf)
15669        } else {
15670            Bytes::new(__input)
15671        };
15672        let mut __struct = Self::default();
15673        __struct.time_usec = buf.get_u64_le()?;
15674        __struct.roll_ailerons = buf.get_f32_le()?;
15675        __struct.pitch_elevator = buf.get_f32_le()?;
15676        __struct.yaw_rudder = buf.get_f32_le()?;
15677        __struct.throttle = buf.get_f32_le()?;
15678        __struct.aux1 = buf.get_f32_le()?;
15679        __struct.aux2 = buf.get_f32_le()?;
15680        __struct.aux3 = buf.get_f32_le()?;
15681        __struct.aux4 = buf.get_f32_le()?;
15682        let tmp = buf.get_u8()?;
15683        __struct.mode =
15684            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15685                enum_type: "MavMode",
15686                value: tmp as u64,
15687            })?;
15688        __struct.nav_mode = buf.get_u8()?;
15689        Ok(__struct)
15690    }
15691    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15692        let mut __tmp = BytesMut::new(bytes);
15693        #[allow(clippy::absurd_extreme_comparisons)]
15694        #[allow(unused_comparisons)]
15695        if __tmp.remaining() < Self::ENCODED_LEN {
15696            panic!(
15697                "buffer is too small (need {} bytes, but got {})",
15698                Self::ENCODED_LEN,
15699                __tmp.remaining(),
15700            )
15701        }
15702        __tmp.put_u64_le(self.time_usec);
15703        __tmp.put_f32_le(self.roll_ailerons);
15704        __tmp.put_f32_le(self.pitch_elevator);
15705        __tmp.put_f32_le(self.yaw_rudder);
15706        __tmp.put_f32_le(self.throttle);
15707        __tmp.put_f32_le(self.aux1);
15708        __tmp.put_f32_le(self.aux2);
15709        __tmp.put_f32_le(self.aux3);
15710        __tmp.put_f32_le(self.aux4);
15711        __tmp.put_u8(self.mode as u8);
15712        __tmp.put_u8(self.nav_mode);
15713        if matches!(version, MavlinkVersion::V2) {
15714            let len = __tmp.len();
15715            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15716        } else {
15717            __tmp.len()
15718        }
15719    }
15720}
15721#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15722#[doc = ""]
15723#[doc = "ID: 113"]
15724#[derive(Debug, Clone, PartialEq)]
15725#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15726#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15727#[cfg_attr(feature = "ts", derive(TS))]
15728#[cfg_attr(feature = "ts", ts(export))]
15729pub struct HIL_GPS_DATA {
15730    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15731    pub time_usec: u64,
15732    #[doc = "Latitude (WGS84)"]
15733    pub lat: i32,
15734    #[doc = "Longitude (WGS84)"]
15735    pub lon: i32,
15736    #[doc = "Altitude (MSL). Positive for up."]
15737    pub alt: i32,
15738    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15739    pub eph: u16,
15740    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15741    pub epv: u16,
15742    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15743    pub vel: u16,
15744    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15745    pub vn: i16,
15746    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15747    pub ve: i16,
15748    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15749    pub vd: i16,
15750    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15751    pub cog: u16,
15752    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15753    pub fix_type: u8,
15754    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15755    pub satellites_visible: u8,
15756    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15757    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15758    pub id: u8,
15759    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15760    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15761    pub yaw: u16,
15762}
15763impl HIL_GPS_DATA {
15764    pub const ENCODED_LEN: usize = 39usize;
15765    pub const DEFAULT: Self = Self {
15766        time_usec: 0_u64,
15767        lat: 0_i32,
15768        lon: 0_i32,
15769        alt: 0_i32,
15770        eph: 0_u16,
15771        epv: 0_u16,
15772        vel: 0_u16,
15773        vn: 0_i16,
15774        ve: 0_i16,
15775        vd: 0_i16,
15776        cog: 0_u16,
15777        fix_type: 0_u8,
15778        satellites_visible: 0_u8,
15779        id: 0_u8,
15780        yaw: 0_u16,
15781    };
15782    #[cfg(feature = "arbitrary")]
15783    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15784        use arbitrary::{Arbitrary, Unstructured};
15785        let mut buf = [0u8; 1024];
15786        rng.fill_bytes(&mut buf);
15787        let mut unstructured = Unstructured::new(&buf);
15788        Self::arbitrary(&mut unstructured).unwrap_or_default()
15789    }
15790}
15791impl Default for HIL_GPS_DATA {
15792    fn default() -> Self {
15793        Self::DEFAULT.clone()
15794    }
15795}
15796impl MessageData for HIL_GPS_DATA {
15797    type Message = MavMessage;
15798    const ID: u32 = 113u32;
15799    const NAME: &'static str = "HIL_GPS";
15800    const EXTRA_CRC: u8 = 124u8;
15801    const ENCODED_LEN: usize = 39usize;
15802    fn deser(
15803        _version: MavlinkVersion,
15804        __input: &[u8],
15805    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15806        let avail_len = __input.len();
15807        let mut payload_buf = [0; Self::ENCODED_LEN];
15808        let mut buf = if avail_len < Self::ENCODED_LEN {
15809            payload_buf[0..avail_len].copy_from_slice(__input);
15810            Bytes::new(&payload_buf)
15811        } else {
15812            Bytes::new(__input)
15813        };
15814        let mut __struct = Self::default();
15815        __struct.time_usec = buf.get_u64_le()?;
15816        __struct.lat = buf.get_i32_le()?;
15817        __struct.lon = buf.get_i32_le()?;
15818        __struct.alt = buf.get_i32_le()?;
15819        __struct.eph = buf.get_u16_le()?;
15820        __struct.epv = buf.get_u16_le()?;
15821        __struct.vel = buf.get_u16_le()?;
15822        __struct.vn = buf.get_i16_le()?;
15823        __struct.ve = buf.get_i16_le()?;
15824        __struct.vd = buf.get_i16_le()?;
15825        __struct.cog = buf.get_u16_le()?;
15826        __struct.fix_type = buf.get_u8()?;
15827        __struct.satellites_visible = buf.get_u8()?;
15828        __struct.id = buf.get_u8()?;
15829        __struct.yaw = buf.get_u16_le()?;
15830        Ok(__struct)
15831    }
15832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15833        let mut __tmp = BytesMut::new(bytes);
15834        #[allow(clippy::absurd_extreme_comparisons)]
15835        #[allow(unused_comparisons)]
15836        if __tmp.remaining() < Self::ENCODED_LEN {
15837            panic!(
15838                "buffer is too small (need {} bytes, but got {})",
15839                Self::ENCODED_LEN,
15840                __tmp.remaining(),
15841            )
15842        }
15843        __tmp.put_u64_le(self.time_usec);
15844        __tmp.put_i32_le(self.lat);
15845        __tmp.put_i32_le(self.lon);
15846        __tmp.put_i32_le(self.alt);
15847        __tmp.put_u16_le(self.eph);
15848        __tmp.put_u16_le(self.epv);
15849        __tmp.put_u16_le(self.vel);
15850        __tmp.put_i16_le(self.vn);
15851        __tmp.put_i16_le(self.ve);
15852        __tmp.put_i16_le(self.vd);
15853        __tmp.put_u16_le(self.cog);
15854        __tmp.put_u8(self.fix_type);
15855        __tmp.put_u8(self.satellites_visible);
15856        if matches!(version, MavlinkVersion::V2) {
15857            __tmp.put_u8(self.id);
15858            __tmp.put_u16_le(self.yaw);
15859            let len = __tmp.len();
15860            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15861        } else {
15862            __tmp.len()
15863        }
15864    }
15865}
15866#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
15867#[doc = ""]
15868#[doc = "ID: 114"]
15869#[derive(Debug, Clone, PartialEq)]
15870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15872#[cfg_attr(feature = "ts", derive(TS))]
15873#[cfg_attr(feature = "ts", ts(export))]
15874pub struct HIL_OPTICAL_FLOW_DATA {
15875    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15876    pub time_usec: u64,
15877    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
15878    pub integration_time_us: u32,
15879    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
15880    pub integrated_x: f32,
15881    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
15882    pub integrated_y: f32,
15883    #[doc = "RH rotation around X axis"]
15884    pub integrated_xgyro: f32,
15885    #[doc = "RH rotation around Y axis"]
15886    pub integrated_ygyro: f32,
15887    #[doc = "RH rotation around Z axis"]
15888    pub integrated_zgyro: f32,
15889    #[doc = "Time since the distance was sampled."]
15890    pub time_delta_distance_us: u32,
15891    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
15892    pub distance: f32,
15893    #[doc = "Temperature"]
15894    pub temperature: i16,
15895    #[doc = "Sensor ID"]
15896    pub sensor_id: u8,
15897    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
15898    pub quality: u8,
15899}
15900impl HIL_OPTICAL_FLOW_DATA {
15901    pub const ENCODED_LEN: usize = 44usize;
15902    pub const DEFAULT: Self = Self {
15903        time_usec: 0_u64,
15904        integration_time_us: 0_u32,
15905        integrated_x: 0.0_f32,
15906        integrated_y: 0.0_f32,
15907        integrated_xgyro: 0.0_f32,
15908        integrated_ygyro: 0.0_f32,
15909        integrated_zgyro: 0.0_f32,
15910        time_delta_distance_us: 0_u32,
15911        distance: 0.0_f32,
15912        temperature: 0_i16,
15913        sensor_id: 0_u8,
15914        quality: 0_u8,
15915    };
15916    #[cfg(feature = "arbitrary")]
15917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15918        use arbitrary::{Arbitrary, Unstructured};
15919        let mut buf = [0u8; 1024];
15920        rng.fill_bytes(&mut buf);
15921        let mut unstructured = Unstructured::new(&buf);
15922        Self::arbitrary(&mut unstructured).unwrap_or_default()
15923    }
15924}
15925impl Default for HIL_OPTICAL_FLOW_DATA {
15926    fn default() -> Self {
15927        Self::DEFAULT.clone()
15928    }
15929}
15930impl MessageData for HIL_OPTICAL_FLOW_DATA {
15931    type Message = MavMessage;
15932    const ID: u32 = 114u32;
15933    const NAME: &'static str = "HIL_OPTICAL_FLOW";
15934    const EXTRA_CRC: u8 = 237u8;
15935    const ENCODED_LEN: usize = 44usize;
15936    fn deser(
15937        _version: MavlinkVersion,
15938        __input: &[u8],
15939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15940        let avail_len = __input.len();
15941        let mut payload_buf = [0; Self::ENCODED_LEN];
15942        let mut buf = if avail_len < Self::ENCODED_LEN {
15943            payload_buf[0..avail_len].copy_from_slice(__input);
15944            Bytes::new(&payload_buf)
15945        } else {
15946            Bytes::new(__input)
15947        };
15948        let mut __struct = Self::default();
15949        __struct.time_usec = buf.get_u64_le()?;
15950        __struct.integration_time_us = buf.get_u32_le()?;
15951        __struct.integrated_x = buf.get_f32_le()?;
15952        __struct.integrated_y = buf.get_f32_le()?;
15953        __struct.integrated_xgyro = buf.get_f32_le()?;
15954        __struct.integrated_ygyro = buf.get_f32_le()?;
15955        __struct.integrated_zgyro = buf.get_f32_le()?;
15956        __struct.time_delta_distance_us = buf.get_u32_le()?;
15957        __struct.distance = buf.get_f32_le()?;
15958        __struct.temperature = buf.get_i16_le()?;
15959        __struct.sensor_id = buf.get_u8()?;
15960        __struct.quality = buf.get_u8()?;
15961        Ok(__struct)
15962    }
15963    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15964        let mut __tmp = BytesMut::new(bytes);
15965        #[allow(clippy::absurd_extreme_comparisons)]
15966        #[allow(unused_comparisons)]
15967        if __tmp.remaining() < Self::ENCODED_LEN {
15968            panic!(
15969                "buffer is too small (need {} bytes, but got {})",
15970                Self::ENCODED_LEN,
15971                __tmp.remaining(),
15972            )
15973        }
15974        __tmp.put_u64_le(self.time_usec);
15975        __tmp.put_u32_le(self.integration_time_us);
15976        __tmp.put_f32_le(self.integrated_x);
15977        __tmp.put_f32_le(self.integrated_y);
15978        __tmp.put_f32_le(self.integrated_xgyro);
15979        __tmp.put_f32_le(self.integrated_ygyro);
15980        __tmp.put_f32_le(self.integrated_zgyro);
15981        __tmp.put_u32_le(self.time_delta_distance_us);
15982        __tmp.put_f32_le(self.distance);
15983        __tmp.put_i16_le(self.temperature);
15984        __tmp.put_u8(self.sensor_id);
15985        __tmp.put_u8(self.quality);
15986        if matches!(version, MavlinkVersion::V2) {
15987            let len = __tmp.len();
15988            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15989        } else {
15990            __tmp.len()
15991        }
15992    }
15993}
15994#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
15995#[doc = ""]
15996#[doc = "ID: 92"]
15997#[derive(Debug, Clone, PartialEq)]
15998#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15999#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16000#[cfg_attr(feature = "ts", derive(TS))]
16001#[cfg_attr(feature = "ts", ts(export))]
16002pub struct HIL_RC_INPUTS_RAW_DATA {
16003    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16004    pub time_usec: u64,
16005    #[doc = "RC channel 1 value"]
16006    pub chan1_raw: u16,
16007    #[doc = "RC channel 2 value"]
16008    pub chan2_raw: u16,
16009    #[doc = "RC channel 3 value"]
16010    pub chan3_raw: u16,
16011    #[doc = "RC channel 4 value"]
16012    pub chan4_raw: u16,
16013    #[doc = "RC channel 5 value"]
16014    pub chan5_raw: u16,
16015    #[doc = "RC channel 6 value"]
16016    pub chan6_raw: u16,
16017    #[doc = "RC channel 7 value"]
16018    pub chan7_raw: u16,
16019    #[doc = "RC channel 8 value"]
16020    pub chan8_raw: u16,
16021    #[doc = "RC channel 9 value"]
16022    pub chan9_raw: u16,
16023    #[doc = "RC channel 10 value"]
16024    pub chan10_raw: u16,
16025    #[doc = "RC channel 11 value"]
16026    pub chan11_raw: u16,
16027    #[doc = "RC channel 12 value"]
16028    pub chan12_raw: u16,
16029    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16030    pub rssi: u8,
16031}
16032impl HIL_RC_INPUTS_RAW_DATA {
16033    pub const ENCODED_LEN: usize = 33usize;
16034    pub const DEFAULT: Self = Self {
16035        time_usec: 0_u64,
16036        chan1_raw: 0_u16,
16037        chan2_raw: 0_u16,
16038        chan3_raw: 0_u16,
16039        chan4_raw: 0_u16,
16040        chan5_raw: 0_u16,
16041        chan6_raw: 0_u16,
16042        chan7_raw: 0_u16,
16043        chan8_raw: 0_u16,
16044        chan9_raw: 0_u16,
16045        chan10_raw: 0_u16,
16046        chan11_raw: 0_u16,
16047        chan12_raw: 0_u16,
16048        rssi: 0_u8,
16049    };
16050    #[cfg(feature = "arbitrary")]
16051    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16052        use arbitrary::{Arbitrary, Unstructured};
16053        let mut buf = [0u8; 1024];
16054        rng.fill_bytes(&mut buf);
16055        let mut unstructured = Unstructured::new(&buf);
16056        Self::arbitrary(&mut unstructured).unwrap_or_default()
16057    }
16058}
16059impl Default for HIL_RC_INPUTS_RAW_DATA {
16060    fn default() -> Self {
16061        Self::DEFAULT.clone()
16062    }
16063}
16064impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16065    type Message = MavMessage;
16066    const ID: u32 = 92u32;
16067    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16068    const EXTRA_CRC: u8 = 54u8;
16069    const ENCODED_LEN: usize = 33usize;
16070    fn deser(
16071        _version: MavlinkVersion,
16072        __input: &[u8],
16073    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16074        let avail_len = __input.len();
16075        let mut payload_buf = [0; Self::ENCODED_LEN];
16076        let mut buf = if avail_len < Self::ENCODED_LEN {
16077            payload_buf[0..avail_len].copy_from_slice(__input);
16078            Bytes::new(&payload_buf)
16079        } else {
16080            Bytes::new(__input)
16081        };
16082        let mut __struct = Self::default();
16083        __struct.time_usec = buf.get_u64_le()?;
16084        __struct.chan1_raw = buf.get_u16_le()?;
16085        __struct.chan2_raw = buf.get_u16_le()?;
16086        __struct.chan3_raw = buf.get_u16_le()?;
16087        __struct.chan4_raw = buf.get_u16_le()?;
16088        __struct.chan5_raw = buf.get_u16_le()?;
16089        __struct.chan6_raw = buf.get_u16_le()?;
16090        __struct.chan7_raw = buf.get_u16_le()?;
16091        __struct.chan8_raw = buf.get_u16_le()?;
16092        __struct.chan9_raw = buf.get_u16_le()?;
16093        __struct.chan10_raw = buf.get_u16_le()?;
16094        __struct.chan11_raw = buf.get_u16_le()?;
16095        __struct.chan12_raw = buf.get_u16_le()?;
16096        __struct.rssi = buf.get_u8()?;
16097        Ok(__struct)
16098    }
16099    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16100        let mut __tmp = BytesMut::new(bytes);
16101        #[allow(clippy::absurd_extreme_comparisons)]
16102        #[allow(unused_comparisons)]
16103        if __tmp.remaining() < Self::ENCODED_LEN {
16104            panic!(
16105                "buffer is too small (need {} bytes, but got {})",
16106                Self::ENCODED_LEN,
16107                __tmp.remaining(),
16108            )
16109        }
16110        __tmp.put_u64_le(self.time_usec);
16111        __tmp.put_u16_le(self.chan1_raw);
16112        __tmp.put_u16_le(self.chan2_raw);
16113        __tmp.put_u16_le(self.chan3_raw);
16114        __tmp.put_u16_le(self.chan4_raw);
16115        __tmp.put_u16_le(self.chan5_raw);
16116        __tmp.put_u16_le(self.chan6_raw);
16117        __tmp.put_u16_le(self.chan7_raw);
16118        __tmp.put_u16_le(self.chan8_raw);
16119        __tmp.put_u16_le(self.chan9_raw);
16120        __tmp.put_u16_le(self.chan10_raw);
16121        __tmp.put_u16_le(self.chan11_raw);
16122        __tmp.put_u16_le(self.chan12_raw);
16123        __tmp.put_u8(self.rssi);
16124        if matches!(version, MavlinkVersion::V2) {
16125            let len = __tmp.len();
16126            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16127        } else {
16128            __tmp.len()
16129        }
16130    }
16131}
16132#[doc = "The IMU readings in SI units in NED body frame."]
16133#[doc = ""]
16134#[doc = "ID: 107"]
16135#[derive(Debug, Clone, PartialEq)]
16136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16137#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16138#[cfg_attr(feature = "ts", derive(TS))]
16139#[cfg_attr(feature = "ts", ts(export))]
16140pub struct HIL_SENSOR_DATA {
16141    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16142    pub time_usec: u64,
16143    #[doc = "X acceleration"]
16144    pub xacc: f32,
16145    #[doc = "Y acceleration"]
16146    pub yacc: f32,
16147    #[doc = "Z acceleration"]
16148    pub zacc: f32,
16149    #[doc = "Angular speed around X axis in body frame"]
16150    pub xgyro: f32,
16151    #[doc = "Angular speed around Y axis in body frame"]
16152    pub ygyro: f32,
16153    #[doc = "Angular speed around Z axis in body frame"]
16154    pub zgyro: f32,
16155    #[doc = "X Magnetic field"]
16156    pub xmag: f32,
16157    #[doc = "Y Magnetic field"]
16158    pub ymag: f32,
16159    #[doc = "Z Magnetic field"]
16160    pub zmag: f32,
16161    #[doc = "Absolute pressure"]
16162    pub abs_pressure: f32,
16163    #[doc = "Differential pressure (airspeed)"]
16164    pub diff_pressure: f32,
16165    #[doc = "Altitude calculated from pressure"]
16166    pub pressure_alt: f32,
16167    #[doc = "Temperature"]
16168    pub temperature: f32,
16169    #[doc = "Bitmap for fields that have updated since last message"]
16170    pub fields_updated: HilSensorUpdatedFlags,
16171    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16172    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16173    pub id: u8,
16174}
16175impl HIL_SENSOR_DATA {
16176    pub const ENCODED_LEN: usize = 65usize;
16177    pub const DEFAULT: Self = Self {
16178        time_usec: 0_u64,
16179        xacc: 0.0_f32,
16180        yacc: 0.0_f32,
16181        zacc: 0.0_f32,
16182        xgyro: 0.0_f32,
16183        ygyro: 0.0_f32,
16184        zgyro: 0.0_f32,
16185        xmag: 0.0_f32,
16186        ymag: 0.0_f32,
16187        zmag: 0.0_f32,
16188        abs_pressure: 0.0_f32,
16189        diff_pressure: 0.0_f32,
16190        pressure_alt: 0.0_f32,
16191        temperature: 0.0_f32,
16192        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16193        id: 0_u8,
16194    };
16195    #[cfg(feature = "arbitrary")]
16196    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16197        use arbitrary::{Arbitrary, Unstructured};
16198        let mut buf = [0u8; 1024];
16199        rng.fill_bytes(&mut buf);
16200        let mut unstructured = Unstructured::new(&buf);
16201        Self::arbitrary(&mut unstructured).unwrap_or_default()
16202    }
16203}
16204impl Default for HIL_SENSOR_DATA {
16205    fn default() -> Self {
16206        Self::DEFAULT.clone()
16207    }
16208}
16209impl MessageData for HIL_SENSOR_DATA {
16210    type Message = MavMessage;
16211    const ID: u32 = 107u32;
16212    const NAME: &'static str = "HIL_SENSOR";
16213    const EXTRA_CRC: u8 = 108u8;
16214    const ENCODED_LEN: usize = 65usize;
16215    fn deser(
16216        _version: MavlinkVersion,
16217        __input: &[u8],
16218    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16219        let avail_len = __input.len();
16220        let mut payload_buf = [0; Self::ENCODED_LEN];
16221        let mut buf = if avail_len < Self::ENCODED_LEN {
16222            payload_buf[0..avail_len].copy_from_slice(__input);
16223            Bytes::new(&payload_buf)
16224        } else {
16225            Bytes::new(__input)
16226        };
16227        let mut __struct = Self::default();
16228        __struct.time_usec = buf.get_u64_le()?;
16229        __struct.xacc = buf.get_f32_le()?;
16230        __struct.yacc = buf.get_f32_le()?;
16231        __struct.zacc = buf.get_f32_le()?;
16232        __struct.xgyro = buf.get_f32_le()?;
16233        __struct.ygyro = buf.get_f32_le()?;
16234        __struct.zgyro = buf.get_f32_le()?;
16235        __struct.xmag = buf.get_f32_le()?;
16236        __struct.ymag = buf.get_f32_le()?;
16237        __struct.zmag = buf.get_f32_le()?;
16238        __struct.abs_pressure = buf.get_f32_le()?;
16239        __struct.diff_pressure = buf.get_f32_le()?;
16240        __struct.pressure_alt = buf.get_f32_le()?;
16241        __struct.temperature = buf.get_f32_le()?;
16242        let tmp = buf.get_u32_le()?;
16243        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16244            tmp as <HilSensorUpdatedFlags as Flags>::Bits,
16245        )
16246        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16247            flag_type: "HilSensorUpdatedFlags",
16248            value: tmp as u64,
16249        })?;
16250        __struct.id = buf.get_u8()?;
16251        Ok(__struct)
16252    }
16253    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16254        let mut __tmp = BytesMut::new(bytes);
16255        #[allow(clippy::absurd_extreme_comparisons)]
16256        #[allow(unused_comparisons)]
16257        if __tmp.remaining() < Self::ENCODED_LEN {
16258            panic!(
16259                "buffer is too small (need {} bytes, but got {})",
16260                Self::ENCODED_LEN,
16261                __tmp.remaining(),
16262            )
16263        }
16264        __tmp.put_u64_le(self.time_usec);
16265        __tmp.put_f32_le(self.xacc);
16266        __tmp.put_f32_le(self.yacc);
16267        __tmp.put_f32_le(self.zacc);
16268        __tmp.put_f32_le(self.xgyro);
16269        __tmp.put_f32_le(self.ygyro);
16270        __tmp.put_f32_le(self.zgyro);
16271        __tmp.put_f32_le(self.xmag);
16272        __tmp.put_f32_le(self.ymag);
16273        __tmp.put_f32_le(self.zmag);
16274        __tmp.put_f32_le(self.abs_pressure);
16275        __tmp.put_f32_le(self.diff_pressure);
16276        __tmp.put_f32_le(self.pressure_alt);
16277        __tmp.put_f32_le(self.temperature);
16278        __tmp.put_u32_le(self.fields_updated.bits() as u32);
16279        if matches!(version, MavlinkVersion::V2) {
16280            __tmp.put_u8(self.id);
16281            let len = __tmp.len();
16282            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16283        } else {
16284            __tmp.len()
16285        }
16286    }
16287}
16288#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16289#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16290#[doc = ""]
16291#[doc = "ID: 90"]
16292#[derive(Debug, Clone, PartialEq)]
16293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16295#[cfg_attr(feature = "ts", derive(TS))]
16296#[cfg_attr(feature = "ts", ts(export))]
16297pub struct HIL_STATE_DATA {
16298    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16299    pub time_usec: u64,
16300    #[doc = "Roll angle"]
16301    pub roll: f32,
16302    #[doc = "Pitch angle"]
16303    pub pitch: f32,
16304    #[doc = "Yaw angle"]
16305    pub yaw: f32,
16306    #[doc = "Body frame roll / phi angular speed"]
16307    pub rollspeed: f32,
16308    #[doc = "Body frame pitch / theta angular speed"]
16309    pub pitchspeed: f32,
16310    #[doc = "Body frame yaw / psi angular speed"]
16311    pub yawspeed: f32,
16312    #[doc = "Latitude"]
16313    pub lat: i32,
16314    #[doc = "Longitude"]
16315    pub lon: i32,
16316    #[doc = "Altitude"]
16317    pub alt: i32,
16318    #[doc = "Ground X Speed (Latitude)"]
16319    pub vx: i16,
16320    #[doc = "Ground Y Speed (Longitude)"]
16321    pub vy: i16,
16322    #[doc = "Ground Z Speed (Altitude)"]
16323    pub vz: i16,
16324    #[doc = "X acceleration"]
16325    pub xacc: i16,
16326    #[doc = "Y acceleration"]
16327    pub yacc: i16,
16328    #[doc = "Z acceleration"]
16329    pub zacc: i16,
16330}
16331impl HIL_STATE_DATA {
16332    pub const ENCODED_LEN: usize = 56usize;
16333    pub const DEFAULT: Self = Self {
16334        time_usec: 0_u64,
16335        roll: 0.0_f32,
16336        pitch: 0.0_f32,
16337        yaw: 0.0_f32,
16338        rollspeed: 0.0_f32,
16339        pitchspeed: 0.0_f32,
16340        yawspeed: 0.0_f32,
16341        lat: 0_i32,
16342        lon: 0_i32,
16343        alt: 0_i32,
16344        vx: 0_i16,
16345        vy: 0_i16,
16346        vz: 0_i16,
16347        xacc: 0_i16,
16348        yacc: 0_i16,
16349        zacc: 0_i16,
16350    };
16351    #[cfg(feature = "arbitrary")]
16352    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16353        use arbitrary::{Arbitrary, Unstructured};
16354        let mut buf = [0u8; 1024];
16355        rng.fill_bytes(&mut buf);
16356        let mut unstructured = Unstructured::new(&buf);
16357        Self::arbitrary(&mut unstructured).unwrap_or_default()
16358    }
16359}
16360impl Default for HIL_STATE_DATA {
16361    fn default() -> Self {
16362        Self::DEFAULT.clone()
16363    }
16364}
16365impl MessageData for HIL_STATE_DATA {
16366    type Message = MavMessage;
16367    const ID: u32 = 90u32;
16368    const NAME: &'static str = "HIL_STATE";
16369    const EXTRA_CRC: u8 = 183u8;
16370    const ENCODED_LEN: usize = 56usize;
16371    fn deser(
16372        _version: MavlinkVersion,
16373        __input: &[u8],
16374    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16375        let avail_len = __input.len();
16376        let mut payload_buf = [0; Self::ENCODED_LEN];
16377        let mut buf = if avail_len < Self::ENCODED_LEN {
16378            payload_buf[0..avail_len].copy_from_slice(__input);
16379            Bytes::new(&payload_buf)
16380        } else {
16381            Bytes::new(__input)
16382        };
16383        let mut __struct = Self::default();
16384        __struct.time_usec = buf.get_u64_le()?;
16385        __struct.roll = buf.get_f32_le()?;
16386        __struct.pitch = buf.get_f32_le()?;
16387        __struct.yaw = buf.get_f32_le()?;
16388        __struct.rollspeed = buf.get_f32_le()?;
16389        __struct.pitchspeed = buf.get_f32_le()?;
16390        __struct.yawspeed = buf.get_f32_le()?;
16391        __struct.lat = buf.get_i32_le()?;
16392        __struct.lon = buf.get_i32_le()?;
16393        __struct.alt = buf.get_i32_le()?;
16394        __struct.vx = buf.get_i16_le()?;
16395        __struct.vy = buf.get_i16_le()?;
16396        __struct.vz = buf.get_i16_le()?;
16397        __struct.xacc = buf.get_i16_le()?;
16398        __struct.yacc = buf.get_i16_le()?;
16399        __struct.zacc = buf.get_i16_le()?;
16400        Ok(__struct)
16401    }
16402    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16403        let mut __tmp = BytesMut::new(bytes);
16404        #[allow(clippy::absurd_extreme_comparisons)]
16405        #[allow(unused_comparisons)]
16406        if __tmp.remaining() < Self::ENCODED_LEN {
16407            panic!(
16408                "buffer is too small (need {} bytes, but got {})",
16409                Self::ENCODED_LEN,
16410                __tmp.remaining(),
16411            )
16412        }
16413        __tmp.put_u64_le(self.time_usec);
16414        __tmp.put_f32_le(self.roll);
16415        __tmp.put_f32_le(self.pitch);
16416        __tmp.put_f32_le(self.yaw);
16417        __tmp.put_f32_le(self.rollspeed);
16418        __tmp.put_f32_le(self.pitchspeed);
16419        __tmp.put_f32_le(self.yawspeed);
16420        __tmp.put_i32_le(self.lat);
16421        __tmp.put_i32_le(self.lon);
16422        __tmp.put_i32_le(self.alt);
16423        __tmp.put_i16_le(self.vx);
16424        __tmp.put_i16_le(self.vy);
16425        __tmp.put_i16_le(self.vz);
16426        __tmp.put_i16_le(self.xacc);
16427        __tmp.put_i16_le(self.yacc);
16428        __tmp.put_i16_le(self.zacc);
16429        if matches!(version, MavlinkVersion::V2) {
16430            let len = __tmp.len();
16431            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16432        } else {
16433            __tmp.len()
16434        }
16435    }
16436}
16437#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16438#[doc = ""]
16439#[doc = "ID: 115"]
16440#[derive(Debug, Clone, PartialEq)]
16441#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16442#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16443#[cfg_attr(feature = "ts", derive(TS))]
16444#[cfg_attr(feature = "ts", ts(export))]
16445pub struct HIL_STATE_QUATERNION_DATA {
16446    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16447    pub time_usec: u64,
16448    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16449    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16450    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16451    pub attitude_quaternion: [f32; 4],
16452    #[doc = "Body frame roll / phi angular speed"]
16453    pub rollspeed: f32,
16454    #[doc = "Body frame pitch / theta angular speed"]
16455    pub pitchspeed: f32,
16456    #[doc = "Body frame yaw / psi angular speed"]
16457    pub yawspeed: f32,
16458    #[doc = "Latitude"]
16459    pub lat: i32,
16460    #[doc = "Longitude"]
16461    pub lon: i32,
16462    #[doc = "Altitude"]
16463    pub alt: i32,
16464    #[doc = "Ground X Speed (Latitude)"]
16465    pub vx: i16,
16466    #[doc = "Ground Y Speed (Longitude)"]
16467    pub vy: i16,
16468    #[doc = "Ground Z Speed (Altitude)"]
16469    pub vz: i16,
16470    #[doc = "Indicated airspeed"]
16471    pub ind_airspeed: u16,
16472    #[doc = "True airspeed"]
16473    pub true_airspeed: u16,
16474    #[doc = "X acceleration"]
16475    pub xacc: i16,
16476    #[doc = "Y acceleration"]
16477    pub yacc: i16,
16478    #[doc = "Z acceleration"]
16479    pub zacc: i16,
16480}
16481impl HIL_STATE_QUATERNION_DATA {
16482    pub const ENCODED_LEN: usize = 64usize;
16483    pub const DEFAULT: Self = Self {
16484        time_usec: 0_u64,
16485        attitude_quaternion: [0.0_f32; 4usize],
16486        rollspeed: 0.0_f32,
16487        pitchspeed: 0.0_f32,
16488        yawspeed: 0.0_f32,
16489        lat: 0_i32,
16490        lon: 0_i32,
16491        alt: 0_i32,
16492        vx: 0_i16,
16493        vy: 0_i16,
16494        vz: 0_i16,
16495        ind_airspeed: 0_u16,
16496        true_airspeed: 0_u16,
16497        xacc: 0_i16,
16498        yacc: 0_i16,
16499        zacc: 0_i16,
16500    };
16501    #[cfg(feature = "arbitrary")]
16502    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16503        use arbitrary::{Arbitrary, Unstructured};
16504        let mut buf = [0u8; 1024];
16505        rng.fill_bytes(&mut buf);
16506        let mut unstructured = Unstructured::new(&buf);
16507        Self::arbitrary(&mut unstructured).unwrap_or_default()
16508    }
16509}
16510impl Default for HIL_STATE_QUATERNION_DATA {
16511    fn default() -> Self {
16512        Self::DEFAULT.clone()
16513    }
16514}
16515impl MessageData for HIL_STATE_QUATERNION_DATA {
16516    type Message = MavMessage;
16517    const ID: u32 = 115u32;
16518    const NAME: &'static str = "HIL_STATE_QUATERNION";
16519    const EXTRA_CRC: u8 = 4u8;
16520    const ENCODED_LEN: usize = 64usize;
16521    fn deser(
16522        _version: MavlinkVersion,
16523        __input: &[u8],
16524    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16525        let avail_len = __input.len();
16526        let mut payload_buf = [0; Self::ENCODED_LEN];
16527        let mut buf = if avail_len < Self::ENCODED_LEN {
16528            payload_buf[0..avail_len].copy_from_slice(__input);
16529            Bytes::new(&payload_buf)
16530        } else {
16531            Bytes::new(__input)
16532        };
16533        let mut __struct = Self::default();
16534        __struct.time_usec = buf.get_u64_le()?;
16535        for v in &mut __struct.attitude_quaternion {
16536            let val = buf.get_f32_le()?;
16537            *v = val;
16538        }
16539        __struct.rollspeed = buf.get_f32_le()?;
16540        __struct.pitchspeed = buf.get_f32_le()?;
16541        __struct.yawspeed = buf.get_f32_le()?;
16542        __struct.lat = buf.get_i32_le()?;
16543        __struct.lon = buf.get_i32_le()?;
16544        __struct.alt = buf.get_i32_le()?;
16545        __struct.vx = buf.get_i16_le()?;
16546        __struct.vy = buf.get_i16_le()?;
16547        __struct.vz = buf.get_i16_le()?;
16548        __struct.ind_airspeed = buf.get_u16_le()?;
16549        __struct.true_airspeed = buf.get_u16_le()?;
16550        __struct.xacc = buf.get_i16_le()?;
16551        __struct.yacc = buf.get_i16_le()?;
16552        __struct.zacc = buf.get_i16_le()?;
16553        Ok(__struct)
16554    }
16555    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16556        let mut __tmp = BytesMut::new(bytes);
16557        #[allow(clippy::absurd_extreme_comparisons)]
16558        #[allow(unused_comparisons)]
16559        if __tmp.remaining() < Self::ENCODED_LEN {
16560            panic!(
16561                "buffer is too small (need {} bytes, but got {})",
16562                Self::ENCODED_LEN,
16563                __tmp.remaining(),
16564            )
16565        }
16566        __tmp.put_u64_le(self.time_usec);
16567        for val in &self.attitude_quaternion {
16568            __tmp.put_f32_le(*val);
16569        }
16570        __tmp.put_f32_le(self.rollspeed);
16571        __tmp.put_f32_le(self.pitchspeed);
16572        __tmp.put_f32_le(self.yawspeed);
16573        __tmp.put_i32_le(self.lat);
16574        __tmp.put_i32_le(self.lon);
16575        __tmp.put_i32_le(self.alt);
16576        __tmp.put_i16_le(self.vx);
16577        __tmp.put_i16_le(self.vy);
16578        __tmp.put_i16_le(self.vz);
16579        __tmp.put_u16_le(self.ind_airspeed);
16580        __tmp.put_u16_le(self.true_airspeed);
16581        __tmp.put_i16_le(self.xacc);
16582        __tmp.put_i16_le(self.yacc);
16583        __tmp.put_i16_le(self.zacc);
16584        if matches!(version, MavlinkVersion::V2) {
16585            let len = __tmp.len();
16586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16587        } else {
16588            __tmp.len()
16589        }
16590    }
16591}
16592#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16593#[doc = ""]
16594#[doc = "ID: 242"]
16595#[derive(Debug, Clone, PartialEq)]
16596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16598#[cfg_attr(feature = "ts", derive(TS))]
16599#[cfg_attr(feature = "ts", ts(export))]
16600pub struct HOME_POSITION_DATA {
16601    #[doc = "Latitude (WGS84)"]
16602    pub latitude: i32,
16603    #[doc = "Longitude (WGS84)"]
16604    pub longitude: i32,
16605    #[doc = "Altitude (MSL). Positive for up."]
16606    pub altitude: i32,
16607    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16608    pub x: f32,
16609    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16610    pub y: f32,
16611    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16612    pub z: f32,
16613    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16614    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16615    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16616    pub q: [f32; 4],
16617    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16618    pub approach_x: f32,
16619    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16620    pub approach_y: f32,
16621    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16622    pub approach_z: f32,
16623    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16624    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16625    pub time_usec: u64,
16626}
16627impl HOME_POSITION_DATA {
16628    pub const ENCODED_LEN: usize = 60usize;
16629    pub const DEFAULT: Self = Self {
16630        latitude: 0_i32,
16631        longitude: 0_i32,
16632        altitude: 0_i32,
16633        x: 0.0_f32,
16634        y: 0.0_f32,
16635        z: 0.0_f32,
16636        q: [0.0_f32; 4usize],
16637        approach_x: 0.0_f32,
16638        approach_y: 0.0_f32,
16639        approach_z: 0.0_f32,
16640        time_usec: 0_u64,
16641    };
16642    #[cfg(feature = "arbitrary")]
16643    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16644        use arbitrary::{Arbitrary, Unstructured};
16645        let mut buf = [0u8; 1024];
16646        rng.fill_bytes(&mut buf);
16647        let mut unstructured = Unstructured::new(&buf);
16648        Self::arbitrary(&mut unstructured).unwrap_or_default()
16649    }
16650}
16651impl Default for HOME_POSITION_DATA {
16652    fn default() -> Self {
16653        Self::DEFAULT.clone()
16654    }
16655}
16656impl MessageData for HOME_POSITION_DATA {
16657    type Message = MavMessage;
16658    const ID: u32 = 242u32;
16659    const NAME: &'static str = "HOME_POSITION";
16660    const EXTRA_CRC: u8 = 104u8;
16661    const ENCODED_LEN: usize = 60usize;
16662    fn deser(
16663        _version: MavlinkVersion,
16664        __input: &[u8],
16665    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16666        let avail_len = __input.len();
16667        let mut payload_buf = [0; Self::ENCODED_LEN];
16668        let mut buf = if avail_len < Self::ENCODED_LEN {
16669            payload_buf[0..avail_len].copy_from_slice(__input);
16670            Bytes::new(&payload_buf)
16671        } else {
16672            Bytes::new(__input)
16673        };
16674        let mut __struct = Self::default();
16675        __struct.latitude = buf.get_i32_le()?;
16676        __struct.longitude = buf.get_i32_le()?;
16677        __struct.altitude = buf.get_i32_le()?;
16678        __struct.x = buf.get_f32_le()?;
16679        __struct.y = buf.get_f32_le()?;
16680        __struct.z = buf.get_f32_le()?;
16681        for v in &mut __struct.q {
16682            let val = buf.get_f32_le()?;
16683            *v = val;
16684        }
16685        __struct.approach_x = buf.get_f32_le()?;
16686        __struct.approach_y = buf.get_f32_le()?;
16687        __struct.approach_z = buf.get_f32_le()?;
16688        __struct.time_usec = buf.get_u64_le()?;
16689        Ok(__struct)
16690    }
16691    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16692        let mut __tmp = BytesMut::new(bytes);
16693        #[allow(clippy::absurd_extreme_comparisons)]
16694        #[allow(unused_comparisons)]
16695        if __tmp.remaining() < Self::ENCODED_LEN {
16696            panic!(
16697                "buffer is too small (need {} bytes, but got {})",
16698                Self::ENCODED_LEN,
16699                __tmp.remaining(),
16700            )
16701        }
16702        __tmp.put_i32_le(self.latitude);
16703        __tmp.put_i32_le(self.longitude);
16704        __tmp.put_i32_le(self.altitude);
16705        __tmp.put_f32_le(self.x);
16706        __tmp.put_f32_le(self.y);
16707        __tmp.put_f32_le(self.z);
16708        for val in &self.q {
16709            __tmp.put_f32_le(*val);
16710        }
16711        __tmp.put_f32_le(self.approach_x);
16712        __tmp.put_f32_le(self.approach_y);
16713        __tmp.put_f32_le(self.approach_z);
16714        if matches!(version, MavlinkVersion::V2) {
16715            __tmp.put_u64_le(self.time_usec);
16716            let len = __tmp.len();
16717            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16718        } else {
16719            __tmp.len()
16720        }
16721    }
16722}
16723#[doc = "Temperature and humidity from hygrometer."]
16724#[doc = ""]
16725#[doc = "ID: 12920"]
16726#[derive(Debug, Clone, PartialEq)]
16727#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16728#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16729#[cfg_attr(feature = "ts", derive(TS))]
16730#[cfg_attr(feature = "ts", ts(export))]
16731pub struct HYGROMETER_SENSOR_DATA {
16732    #[doc = "Temperature"]
16733    pub temperature: i16,
16734    #[doc = "Humidity"]
16735    pub humidity: u16,
16736    #[doc = "Hygrometer ID"]
16737    pub id: u8,
16738}
16739impl HYGROMETER_SENSOR_DATA {
16740    pub const ENCODED_LEN: usize = 5usize;
16741    pub const DEFAULT: Self = Self {
16742        temperature: 0_i16,
16743        humidity: 0_u16,
16744        id: 0_u8,
16745    };
16746    #[cfg(feature = "arbitrary")]
16747    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16748        use arbitrary::{Arbitrary, Unstructured};
16749        let mut buf = [0u8; 1024];
16750        rng.fill_bytes(&mut buf);
16751        let mut unstructured = Unstructured::new(&buf);
16752        Self::arbitrary(&mut unstructured).unwrap_or_default()
16753    }
16754}
16755impl Default for HYGROMETER_SENSOR_DATA {
16756    fn default() -> Self {
16757        Self::DEFAULT.clone()
16758    }
16759}
16760impl MessageData for HYGROMETER_SENSOR_DATA {
16761    type Message = MavMessage;
16762    const ID: u32 = 12920u32;
16763    const NAME: &'static str = "HYGROMETER_SENSOR";
16764    const EXTRA_CRC: u8 = 20u8;
16765    const ENCODED_LEN: usize = 5usize;
16766    fn deser(
16767        _version: MavlinkVersion,
16768        __input: &[u8],
16769    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16770        let avail_len = __input.len();
16771        let mut payload_buf = [0; Self::ENCODED_LEN];
16772        let mut buf = if avail_len < Self::ENCODED_LEN {
16773            payload_buf[0..avail_len].copy_from_slice(__input);
16774            Bytes::new(&payload_buf)
16775        } else {
16776            Bytes::new(__input)
16777        };
16778        let mut __struct = Self::default();
16779        __struct.temperature = buf.get_i16_le()?;
16780        __struct.humidity = buf.get_u16_le()?;
16781        __struct.id = buf.get_u8()?;
16782        Ok(__struct)
16783    }
16784    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16785        let mut __tmp = BytesMut::new(bytes);
16786        #[allow(clippy::absurd_extreme_comparisons)]
16787        #[allow(unused_comparisons)]
16788        if __tmp.remaining() < Self::ENCODED_LEN {
16789            panic!(
16790                "buffer is too small (need {} bytes, but got {})",
16791                Self::ENCODED_LEN,
16792                __tmp.remaining(),
16793            )
16794        }
16795        __tmp.put_i16_le(self.temperature);
16796        __tmp.put_u16_le(self.humidity);
16797        __tmp.put_u8(self.id);
16798        if matches!(version, MavlinkVersion::V2) {
16799            let len = __tmp.len();
16800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16801        } else {
16802            __tmp.len()
16803        }
16804    }
16805}
16806#[doc = "Illuminator status."]
16807#[doc = ""]
16808#[doc = "ID: 440"]
16809#[derive(Debug, Clone, PartialEq)]
16810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16812#[cfg_attr(feature = "ts", derive(TS))]
16813#[cfg_attr(feature = "ts", ts(export))]
16814pub struct ILLUMINATOR_STATUS_DATA {
16815    #[doc = "Time since the start-up of the illuminator in ms"]
16816    pub uptime_ms: u32,
16817    #[doc = "Errors"]
16818    pub error_status: IlluminatorErrorFlags,
16819    #[doc = "Illuminator brightness"]
16820    pub brightness: f32,
16821    #[doc = "Illuminator strobing period in seconds"]
16822    pub strobe_period: f32,
16823    #[doc = "Illuminator strobing duty cycle"]
16824    pub strobe_duty_cycle: f32,
16825    #[doc = "Temperature in Celsius"]
16826    pub temp_c: f32,
16827    #[doc = "Minimum strobing period in seconds"]
16828    pub min_strobe_period: f32,
16829    #[doc = "Maximum strobing period in seconds"]
16830    pub max_strobe_period: f32,
16831    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
16832    pub enable: u8,
16833    #[doc = "Supported illuminator modes"]
16834    pub mode_bitmask: IlluminatorMode,
16835    #[doc = "Illuminator mode"]
16836    pub mode: IlluminatorMode,
16837}
16838impl ILLUMINATOR_STATUS_DATA {
16839    pub const ENCODED_LEN: usize = 35usize;
16840    pub const DEFAULT: Self = Self {
16841        uptime_ms: 0_u32,
16842        error_status: IlluminatorErrorFlags::DEFAULT,
16843        brightness: 0.0_f32,
16844        strobe_period: 0.0_f32,
16845        strobe_duty_cycle: 0.0_f32,
16846        temp_c: 0.0_f32,
16847        min_strobe_period: 0.0_f32,
16848        max_strobe_period: 0.0_f32,
16849        enable: 0_u8,
16850        mode_bitmask: IlluminatorMode::DEFAULT,
16851        mode: IlluminatorMode::DEFAULT,
16852    };
16853    #[cfg(feature = "arbitrary")]
16854    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16855        use arbitrary::{Arbitrary, Unstructured};
16856        let mut buf = [0u8; 1024];
16857        rng.fill_bytes(&mut buf);
16858        let mut unstructured = Unstructured::new(&buf);
16859        Self::arbitrary(&mut unstructured).unwrap_or_default()
16860    }
16861}
16862impl Default for ILLUMINATOR_STATUS_DATA {
16863    fn default() -> Self {
16864        Self::DEFAULT.clone()
16865    }
16866}
16867impl MessageData for ILLUMINATOR_STATUS_DATA {
16868    type Message = MavMessage;
16869    const ID: u32 = 440u32;
16870    const NAME: &'static str = "ILLUMINATOR_STATUS";
16871    const EXTRA_CRC: u8 = 66u8;
16872    const ENCODED_LEN: usize = 35usize;
16873    fn deser(
16874        _version: MavlinkVersion,
16875        __input: &[u8],
16876    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16877        let avail_len = __input.len();
16878        let mut payload_buf = [0; Self::ENCODED_LEN];
16879        let mut buf = if avail_len < Self::ENCODED_LEN {
16880            payload_buf[0..avail_len].copy_from_slice(__input);
16881            Bytes::new(&payload_buf)
16882        } else {
16883            Bytes::new(__input)
16884        };
16885        let mut __struct = Self::default();
16886        __struct.uptime_ms = buf.get_u32_le()?;
16887        let tmp = buf.get_u32_le()?;
16888        __struct.error_status = IlluminatorErrorFlags::from_bits(
16889            tmp as <IlluminatorErrorFlags as Flags>::Bits,
16890        )
16891        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16892            flag_type: "IlluminatorErrorFlags",
16893            value: tmp as u64,
16894        })?;
16895        __struct.brightness = buf.get_f32_le()?;
16896        __struct.strobe_period = buf.get_f32_le()?;
16897        __struct.strobe_duty_cycle = buf.get_f32_le()?;
16898        __struct.temp_c = buf.get_f32_le()?;
16899        __struct.min_strobe_period = buf.get_f32_le()?;
16900        __struct.max_strobe_period = buf.get_f32_le()?;
16901        __struct.enable = buf.get_u8()?;
16902        let tmp = buf.get_u8()?;
16903        __struct.mode_bitmask =
16904            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16905                enum_type: "IlluminatorMode",
16906                value: tmp as u64,
16907            })?;
16908        let tmp = buf.get_u8()?;
16909        __struct.mode =
16910            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16911                enum_type: "IlluminatorMode",
16912                value: tmp as u64,
16913            })?;
16914        Ok(__struct)
16915    }
16916    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16917        let mut __tmp = BytesMut::new(bytes);
16918        #[allow(clippy::absurd_extreme_comparisons)]
16919        #[allow(unused_comparisons)]
16920        if __tmp.remaining() < Self::ENCODED_LEN {
16921            panic!(
16922                "buffer is too small (need {} bytes, but got {})",
16923                Self::ENCODED_LEN,
16924                __tmp.remaining(),
16925            )
16926        }
16927        __tmp.put_u32_le(self.uptime_ms);
16928        __tmp.put_u32_le(self.error_status.bits() as u32);
16929        __tmp.put_f32_le(self.brightness);
16930        __tmp.put_f32_le(self.strobe_period);
16931        __tmp.put_f32_le(self.strobe_duty_cycle);
16932        __tmp.put_f32_le(self.temp_c);
16933        __tmp.put_f32_le(self.min_strobe_period);
16934        __tmp.put_f32_le(self.max_strobe_period);
16935        __tmp.put_u8(self.enable);
16936        __tmp.put_u8(self.mode_bitmask as u8);
16937        __tmp.put_u8(self.mode as u8);
16938        if matches!(version, MavlinkVersion::V2) {
16939            let len = __tmp.len();
16940            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16941        } else {
16942            __tmp.len()
16943        }
16944    }
16945}
16946#[doc = "Status of the Iridium SBD link."]
16947#[doc = ""]
16948#[doc = "ID: 335"]
16949#[derive(Debug, Clone, PartialEq)]
16950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16952#[cfg_attr(feature = "ts", derive(TS))]
16953#[cfg_attr(feature = "ts", ts(export))]
16954pub struct ISBD_LINK_STATUS_DATA {
16955    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16956    pub timestamp: u64,
16957    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16958    pub last_heartbeat: u64,
16959    #[doc = "Number of failed SBD sessions."]
16960    pub failed_sessions: u16,
16961    #[doc = "Number of successful SBD sessions."]
16962    pub successful_sessions: u16,
16963    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
16964    pub signal_quality: u8,
16965    #[doc = "1: Ring call pending, 0: No call pending."]
16966    pub ring_pending: u8,
16967    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
16968    pub tx_session_pending: u8,
16969    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
16970    pub rx_session_pending: u8,
16971}
16972impl ISBD_LINK_STATUS_DATA {
16973    pub const ENCODED_LEN: usize = 24usize;
16974    pub const DEFAULT: Self = Self {
16975        timestamp: 0_u64,
16976        last_heartbeat: 0_u64,
16977        failed_sessions: 0_u16,
16978        successful_sessions: 0_u16,
16979        signal_quality: 0_u8,
16980        ring_pending: 0_u8,
16981        tx_session_pending: 0_u8,
16982        rx_session_pending: 0_u8,
16983    };
16984    #[cfg(feature = "arbitrary")]
16985    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16986        use arbitrary::{Arbitrary, Unstructured};
16987        let mut buf = [0u8; 1024];
16988        rng.fill_bytes(&mut buf);
16989        let mut unstructured = Unstructured::new(&buf);
16990        Self::arbitrary(&mut unstructured).unwrap_or_default()
16991    }
16992}
16993impl Default for ISBD_LINK_STATUS_DATA {
16994    fn default() -> Self {
16995        Self::DEFAULT.clone()
16996    }
16997}
16998impl MessageData for ISBD_LINK_STATUS_DATA {
16999    type Message = MavMessage;
17000    const ID: u32 = 335u32;
17001    const NAME: &'static str = "ISBD_LINK_STATUS";
17002    const EXTRA_CRC: u8 = 225u8;
17003    const ENCODED_LEN: usize = 24usize;
17004    fn deser(
17005        _version: MavlinkVersion,
17006        __input: &[u8],
17007    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17008        let avail_len = __input.len();
17009        let mut payload_buf = [0; Self::ENCODED_LEN];
17010        let mut buf = if avail_len < Self::ENCODED_LEN {
17011            payload_buf[0..avail_len].copy_from_slice(__input);
17012            Bytes::new(&payload_buf)
17013        } else {
17014            Bytes::new(__input)
17015        };
17016        let mut __struct = Self::default();
17017        __struct.timestamp = buf.get_u64_le()?;
17018        __struct.last_heartbeat = buf.get_u64_le()?;
17019        __struct.failed_sessions = buf.get_u16_le()?;
17020        __struct.successful_sessions = buf.get_u16_le()?;
17021        __struct.signal_quality = buf.get_u8()?;
17022        __struct.ring_pending = buf.get_u8()?;
17023        __struct.tx_session_pending = buf.get_u8()?;
17024        __struct.rx_session_pending = buf.get_u8()?;
17025        Ok(__struct)
17026    }
17027    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17028        let mut __tmp = BytesMut::new(bytes);
17029        #[allow(clippy::absurd_extreme_comparisons)]
17030        #[allow(unused_comparisons)]
17031        if __tmp.remaining() < Self::ENCODED_LEN {
17032            panic!(
17033                "buffer is too small (need {} bytes, but got {})",
17034                Self::ENCODED_LEN,
17035                __tmp.remaining(),
17036            )
17037        }
17038        __tmp.put_u64_le(self.timestamp);
17039        __tmp.put_u64_le(self.last_heartbeat);
17040        __tmp.put_u16_le(self.failed_sessions);
17041        __tmp.put_u16_le(self.successful_sessions);
17042        __tmp.put_u8(self.signal_quality);
17043        __tmp.put_u8(self.ring_pending);
17044        __tmp.put_u8(self.tx_session_pending);
17045        __tmp.put_u8(self.rx_session_pending);
17046        if matches!(version, MavlinkVersion::V2) {
17047            let len = __tmp.len();
17048            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17049        } else {
17050            __tmp.len()
17051        }
17052    }
17053}
17054#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17055#[doc = ""]
17056#[doc = "ID: 149"]
17057#[derive(Debug, Clone, PartialEq)]
17058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17060#[cfg_attr(feature = "ts", derive(TS))]
17061#[cfg_attr(feature = "ts", ts(export))]
17062pub struct LANDING_TARGET_DATA {
17063    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17064    pub time_usec: u64,
17065    #[doc = "X-axis angular offset of the target from the center of the image"]
17066    pub angle_x: f32,
17067    #[doc = "Y-axis angular offset of the target from the center of the image"]
17068    pub angle_y: f32,
17069    #[doc = "Distance to the target from the vehicle"]
17070    pub distance: f32,
17071    #[doc = "Size of target along x-axis"]
17072    pub size_x: f32,
17073    #[doc = "Size of target along y-axis"]
17074    pub size_y: f32,
17075    #[doc = "The ID of the target if multiple targets are present"]
17076    pub target_num: u8,
17077    #[doc = "Coordinate frame used for following fields."]
17078    pub frame: MavFrame,
17079    #[doc = "X Position of the landing target in MAV_FRAME"]
17080    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17081    pub x: f32,
17082    #[doc = "Y Position of the landing target in MAV_FRAME"]
17083    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17084    pub y: f32,
17085    #[doc = "Z Position of the landing target in MAV_FRAME"]
17086    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17087    pub z: f32,
17088    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17089    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17090    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17091    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17092    pub q: [f32; 4],
17093    #[doc = "Type of landing target"]
17094    #[cfg_attr(feature = "serde", serde(default))]
17095    pub mavtype: LandingTargetType,
17096    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17097    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17098    pub position_valid: u8,
17099}
17100impl LANDING_TARGET_DATA {
17101    pub const ENCODED_LEN: usize = 60usize;
17102    pub const DEFAULT: Self = Self {
17103        time_usec: 0_u64,
17104        angle_x: 0.0_f32,
17105        angle_y: 0.0_f32,
17106        distance: 0.0_f32,
17107        size_x: 0.0_f32,
17108        size_y: 0.0_f32,
17109        target_num: 0_u8,
17110        frame: MavFrame::DEFAULT,
17111        x: 0.0_f32,
17112        y: 0.0_f32,
17113        z: 0.0_f32,
17114        q: [0.0_f32; 4usize],
17115        mavtype: LandingTargetType::DEFAULT,
17116        position_valid: 0_u8,
17117    };
17118    #[cfg(feature = "arbitrary")]
17119    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17120        use arbitrary::{Arbitrary, Unstructured};
17121        let mut buf = [0u8; 1024];
17122        rng.fill_bytes(&mut buf);
17123        let mut unstructured = Unstructured::new(&buf);
17124        Self::arbitrary(&mut unstructured).unwrap_or_default()
17125    }
17126}
17127impl Default for LANDING_TARGET_DATA {
17128    fn default() -> Self {
17129        Self::DEFAULT.clone()
17130    }
17131}
17132impl MessageData for LANDING_TARGET_DATA {
17133    type Message = MavMessage;
17134    const ID: u32 = 149u32;
17135    const NAME: &'static str = "LANDING_TARGET";
17136    const EXTRA_CRC: u8 = 200u8;
17137    const ENCODED_LEN: usize = 60usize;
17138    fn deser(
17139        _version: MavlinkVersion,
17140        __input: &[u8],
17141    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17142        let avail_len = __input.len();
17143        let mut payload_buf = [0; Self::ENCODED_LEN];
17144        let mut buf = if avail_len < Self::ENCODED_LEN {
17145            payload_buf[0..avail_len].copy_from_slice(__input);
17146            Bytes::new(&payload_buf)
17147        } else {
17148            Bytes::new(__input)
17149        };
17150        let mut __struct = Self::default();
17151        __struct.time_usec = buf.get_u64_le()?;
17152        __struct.angle_x = buf.get_f32_le()?;
17153        __struct.angle_y = buf.get_f32_le()?;
17154        __struct.distance = buf.get_f32_le()?;
17155        __struct.size_x = buf.get_f32_le()?;
17156        __struct.size_y = buf.get_f32_le()?;
17157        __struct.target_num = buf.get_u8()?;
17158        let tmp = buf.get_u8()?;
17159        __struct.frame =
17160            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17161                enum_type: "MavFrame",
17162                value: tmp as u64,
17163            })?;
17164        __struct.x = buf.get_f32_le()?;
17165        __struct.y = buf.get_f32_le()?;
17166        __struct.z = buf.get_f32_le()?;
17167        for v in &mut __struct.q {
17168            let val = buf.get_f32_le()?;
17169            *v = val;
17170        }
17171        let tmp = buf.get_u8()?;
17172        __struct.mavtype =
17173            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17174                enum_type: "LandingTargetType",
17175                value: tmp as u64,
17176            })?;
17177        __struct.position_valid = buf.get_u8()?;
17178        Ok(__struct)
17179    }
17180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17181        let mut __tmp = BytesMut::new(bytes);
17182        #[allow(clippy::absurd_extreme_comparisons)]
17183        #[allow(unused_comparisons)]
17184        if __tmp.remaining() < Self::ENCODED_LEN {
17185            panic!(
17186                "buffer is too small (need {} bytes, but got {})",
17187                Self::ENCODED_LEN,
17188                __tmp.remaining(),
17189            )
17190        }
17191        __tmp.put_u64_le(self.time_usec);
17192        __tmp.put_f32_le(self.angle_x);
17193        __tmp.put_f32_le(self.angle_y);
17194        __tmp.put_f32_le(self.distance);
17195        __tmp.put_f32_le(self.size_x);
17196        __tmp.put_f32_le(self.size_y);
17197        __tmp.put_u8(self.target_num);
17198        __tmp.put_u8(self.frame as u8);
17199        if matches!(version, MavlinkVersion::V2) {
17200            __tmp.put_f32_le(self.x);
17201            __tmp.put_f32_le(self.y);
17202            __tmp.put_f32_le(self.z);
17203            for val in &self.q {
17204                __tmp.put_f32_le(*val);
17205            }
17206            __tmp.put_u8(self.mavtype as u8);
17207            __tmp.put_u8(self.position_valid);
17208            let len = __tmp.len();
17209            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17210        } else {
17211            __tmp.len()
17212        }
17213    }
17214}
17215#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17216#[doc = ""]
17217#[doc = "ID: 8"]
17218#[derive(Debug, Clone, PartialEq)]
17219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17221#[cfg_attr(feature = "ts", derive(TS))]
17222#[cfg_attr(feature = "ts", ts(export))]
17223pub struct LINK_NODE_STATUS_DATA {
17224    #[doc = "Timestamp (time since system boot)."]
17225    pub timestamp: u64,
17226    #[doc = "Transmit rate"]
17227    pub tx_rate: u32,
17228    #[doc = "Receive rate"]
17229    pub rx_rate: u32,
17230    #[doc = "Messages sent"]
17231    pub messages_sent: u32,
17232    #[doc = "Messages received (estimated from counting seq)"]
17233    pub messages_received: u32,
17234    #[doc = "Messages lost (estimated from counting seq)"]
17235    pub messages_lost: u32,
17236    #[doc = "Number of bytes that could not be parsed correctly."]
17237    pub rx_parse_err: u16,
17238    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17239    pub tx_overflows: u16,
17240    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17241    pub rx_overflows: u16,
17242    #[doc = "Remaining free transmit buffer space"]
17243    pub tx_buf: u8,
17244    #[doc = "Remaining free receive buffer space"]
17245    pub rx_buf: u8,
17246}
17247impl LINK_NODE_STATUS_DATA {
17248    pub const ENCODED_LEN: usize = 36usize;
17249    pub const DEFAULT: Self = Self {
17250        timestamp: 0_u64,
17251        tx_rate: 0_u32,
17252        rx_rate: 0_u32,
17253        messages_sent: 0_u32,
17254        messages_received: 0_u32,
17255        messages_lost: 0_u32,
17256        rx_parse_err: 0_u16,
17257        tx_overflows: 0_u16,
17258        rx_overflows: 0_u16,
17259        tx_buf: 0_u8,
17260        rx_buf: 0_u8,
17261    };
17262    #[cfg(feature = "arbitrary")]
17263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17264        use arbitrary::{Arbitrary, Unstructured};
17265        let mut buf = [0u8; 1024];
17266        rng.fill_bytes(&mut buf);
17267        let mut unstructured = Unstructured::new(&buf);
17268        Self::arbitrary(&mut unstructured).unwrap_or_default()
17269    }
17270}
17271impl Default for LINK_NODE_STATUS_DATA {
17272    fn default() -> Self {
17273        Self::DEFAULT.clone()
17274    }
17275}
17276impl MessageData for LINK_NODE_STATUS_DATA {
17277    type Message = MavMessage;
17278    const ID: u32 = 8u32;
17279    const NAME: &'static str = "LINK_NODE_STATUS";
17280    const EXTRA_CRC: u8 = 117u8;
17281    const ENCODED_LEN: usize = 36usize;
17282    fn deser(
17283        _version: MavlinkVersion,
17284        __input: &[u8],
17285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17286        let avail_len = __input.len();
17287        let mut payload_buf = [0; Self::ENCODED_LEN];
17288        let mut buf = if avail_len < Self::ENCODED_LEN {
17289            payload_buf[0..avail_len].copy_from_slice(__input);
17290            Bytes::new(&payload_buf)
17291        } else {
17292            Bytes::new(__input)
17293        };
17294        let mut __struct = Self::default();
17295        __struct.timestamp = buf.get_u64_le()?;
17296        __struct.tx_rate = buf.get_u32_le()?;
17297        __struct.rx_rate = buf.get_u32_le()?;
17298        __struct.messages_sent = buf.get_u32_le()?;
17299        __struct.messages_received = buf.get_u32_le()?;
17300        __struct.messages_lost = buf.get_u32_le()?;
17301        __struct.rx_parse_err = buf.get_u16_le()?;
17302        __struct.tx_overflows = buf.get_u16_le()?;
17303        __struct.rx_overflows = buf.get_u16_le()?;
17304        __struct.tx_buf = buf.get_u8()?;
17305        __struct.rx_buf = buf.get_u8()?;
17306        Ok(__struct)
17307    }
17308    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17309        let mut __tmp = BytesMut::new(bytes);
17310        #[allow(clippy::absurd_extreme_comparisons)]
17311        #[allow(unused_comparisons)]
17312        if __tmp.remaining() < Self::ENCODED_LEN {
17313            panic!(
17314                "buffer is too small (need {} bytes, but got {})",
17315                Self::ENCODED_LEN,
17316                __tmp.remaining(),
17317            )
17318        }
17319        __tmp.put_u64_le(self.timestamp);
17320        __tmp.put_u32_le(self.tx_rate);
17321        __tmp.put_u32_le(self.rx_rate);
17322        __tmp.put_u32_le(self.messages_sent);
17323        __tmp.put_u32_le(self.messages_received);
17324        __tmp.put_u32_le(self.messages_lost);
17325        __tmp.put_u16_le(self.rx_parse_err);
17326        __tmp.put_u16_le(self.tx_overflows);
17327        __tmp.put_u16_le(self.rx_overflows);
17328        __tmp.put_u8(self.tx_buf);
17329        __tmp.put_u8(self.rx_buf);
17330        if matches!(version, MavlinkVersion::V2) {
17331            let len = __tmp.len();
17332            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17333        } else {
17334            __tmp.len()
17335        }
17336    }
17337}
17338#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17339#[doc = ""]
17340#[doc = "ID: 32"]
17341#[derive(Debug, Clone, PartialEq)]
17342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17344#[cfg_attr(feature = "ts", derive(TS))]
17345#[cfg_attr(feature = "ts", ts(export))]
17346pub struct LOCAL_POSITION_NED_DATA {
17347    #[doc = "Timestamp (time since system boot)."]
17348    pub time_boot_ms: u32,
17349    #[doc = "X Position"]
17350    pub x: f32,
17351    #[doc = "Y Position"]
17352    pub y: f32,
17353    #[doc = "Z Position"]
17354    pub z: f32,
17355    #[doc = "X Speed"]
17356    pub vx: f32,
17357    #[doc = "Y Speed"]
17358    pub vy: f32,
17359    #[doc = "Z Speed"]
17360    pub vz: f32,
17361}
17362impl LOCAL_POSITION_NED_DATA {
17363    pub const ENCODED_LEN: usize = 28usize;
17364    pub const DEFAULT: Self = Self {
17365        time_boot_ms: 0_u32,
17366        x: 0.0_f32,
17367        y: 0.0_f32,
17368        z: 0.0_f32,
17369        vx: 0.0_f32,
17370        vy: 0.0_f32,
17371        vz: 0.0_f32,
17372    };
17373    #[cfg(feature = "arbitrary")]
17374    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17375        use arbitrary::{Arbitrary, Unstructured};
17376        let mut buf = [0u8; 1024];
17377        rng.fill_bytes(&mut buf);
17378        let mut unstructured = Unstructured::new(&buf);
17379        Self::arbitrary(&mut unstructured).unwrap_or_default()
17380    }
17381}
17382impl Default for LOCAL_POSITION_NED_DATA {
17383    fn default() -> Self {
17384        Self::DEFAULT.clone()
17385    }
17386}
17387impl MessageData for LOCAL_POSITION_NED_DATA {
17388    type Message = MavMessage;
17389    const ID: u32 = 32u32;
17390    const NAME: &'static str = "LOCAL_POSITION_NED";
17391    const EXTRA_CRC: u8 = 185u8;
17392    const ENCODED_LEN: usize = 28usize;
17393    fn deser(
17394        _version: MavlinkVersion,
17395        __input: &[u8],
17396    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17397        let avail_len = __input.len();
17398        let mut payload_buf = [0; Self::ENCODED_LEN];
17399        let mut buf = if avail_len < Self::ENCODED_LEN {
17400            payload_buf[0..avail_len].copy_from_slice(__input);
17401            Bytes::new(&payload_buf)
17402        } else {
17403            Bytes::new(__input)
17404        };
17405        let mut __struct = Self::default();
17406        __struct.time_boot_ms = buf.get_u32_le()?;
17407        __struct.x = buf.get_f32_le()?;
17408        __struct.y = buf.get_f32_le()?;
17409        __struct.z = buf.get_f32_le()?;
17410        __struct.vx = buf.get_f32_le()?;
17411        __struct.vy = buf.get_f32_le()?;
17412        __struct.vz = buf.get_f32_le()?;
17413        Ok(__struct)
17414    }
17415    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17416        let mut __tmp = BytesMut::new(bytes);
17417        #[allow(clippy::absurd_extreme_comparisons)]
17418        #[allow(unused_comparisons)]
17419        if __tmp.remaining() < Self::ENCODED_LEN {
17420            panic!(
17421                "buffer is too small (need {} bytes, but got {})",
17422                Self::ENCODED_LEN,
17423                __tmp.remaining(),
17424            )
17425        }
17426        __tmp.put_u32_le(self.time_boot_ms);
17427        __tmp.put_f32_le(self.x);
17428        __tmp.put_f32_le(self.y);
17429        __tmp.put_f32_le(self.z);
17430        __tmp.put_f32_le(self.vx);
17431        __tmp.put_f32_le(self.vy);
17432        __tmp.put_f32_le(self.vz);
17433        if matches!(version, MavlinkVersion::V2) {
17434            let len = __tmp.len();
17435            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17436        } else {
17437            __tmp.len()
17438        }
17439    }
17440}
17441#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17442#[doc = ""]
17443#[doc = "ID: 64"]
17444#[derive(Debug, Clone, PartialEq)]
17445#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17446#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17447#[cfg_attr(feature = "ts", derive(TS))]
17448#[cfg_attr(feature = "ts", ts(export))]
17449pub struct LOCAL_POSITION_NED_COV_DATA {
17450    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17451    pub time_usec: u64,
17452    #[doc = "X Position"]
17453    pub x: f32,
17454    #[doc = "Y Position"]
17455    pub y: f32,
17456    #[doc = "Z Position"]
17457    pub z: f32,
17458    #[doc = "X Speed"]
17459    pub vx: f32,
17460    #[doc = "Y Speed"]
17461    pub vy: f32,
17462    #[doc = "Z Speed"]
17463    pub vz: f32,
17464    #[doc = "X Acceleration"]
17465    pub ax: f32,
17466    #[doc = "Y Acceleration"]
17467    pub ay: f32,
17468    #[doc = "Z Acceleration"]
17469    pub az: f32,
17470    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17471    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17472    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17473    pub covariance: [f32; 45],
17474    #[doc = "Class id of the estimator this estimate originated from."]
17475    pub estimator_type: MavEstimatorType,
17476}
17477impl LOCAL_POSITION_NED_COV_DATA {
17478    pub const ENCODED_LEN: usize = 225usize;
17479    pub const DEFAULT: Self = Self {
17480        time_usec: 0_u64,
17481        x: 0.0_f32,
17482        y: 0.0_f32,
17483        z: 0.0_f32,
17484        vx: 0.0_f32,
17485        vy: 0.0_f32,
17486        vz: 0.0_f32,
17487        ax: 0.0_f32,
17488        ay: 0.0_f32,
17489        az: 0.0_f32,
17490        covariance: [0.0_f32; 45usize],
17491        estimator_type: MavEstimatorType::DEFAULT,
17492    };
17493    #[cfg(feature = "arbitrary")]
17494    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17495        use arbitrary::{Arbitrary, Unstructured};
17496        let mut buf = [0u8; 1024];
17497        rng.fill_bytes(&mut buf);
17498        let mut unstructured = Unstructured::new(&buf);
17499        Self::arbitrary(&mut unstructured).unwrap_or_default()
17500    }
17501}
17502impl Default for LOCAL_POSITION_NED_COV_DATA {
17503    fn default() -> Self {
17504        Self::DEFAULT.clone()
17505    }
17506}
17507impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17508    type Message = MavMessage;
17509    const ID: u32 = 64u32;
17510    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17511    const EXTRA_CRC: u8 = 191u8;
17512    const ENCODED_LEN: usize = 225usize;
17513    fn deser(
17514        _version: MavlinkVersion,
17515        __input: &[u8],
17516    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17517        let avail_len = __input.len();
17518        let mut payload_buf = [0; Self::ENCODED_LEN];
17519        let mut buf = if avail_len < Self::ENCODED_LEN {
17520            payload_buf[0..avail_len].copy_from_slice(__input);
17521            Bytes::new(&payload_buf)
17522        } else {
17523            Bytes::new(__input)
17524        };
17525        let mut __struct = Self::default();
17526        __struct.time_usec = buf.get_u64_le()?;
17527        __struct.x = buf.get_f32_le()?;
17528        __struct.y = buf.get_f32_le()?;
17529        __struct.z = buf.get_f32_le()?;
17530        __struct.vx = buf.get_f32_le()?;
17531        __struct.vy = buf.get_f32_le()?;
17532        __struct.vz = buf.get_f32_le()?;
17533        __struct.ax = buf.get_f32_le()?;
17534        __struct.ay = buf.get_f32_le()?;
17535        __struct.az = buf.get_f32_le()?;
17536        for v in &mut __struct.covariance {
17537            let val = buf.get_f32_le()?;
17538            *v = val;
17539        }
17540        let tmp = buf.get_u8()?;
17541        __struct.estimator_type =
17542            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17543                enum_type: "MavEstimatorType",
17544                value: tmp as u64,
17545            })?;
17546        Ok(__struct)
17547    }
17548    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17549        let mut __tmp = BytesMut::new(bytes);
17550        #[allow(clippy::absurd_extreme_comparisons)]
17551        #[allow(unused_comparisons)]
17552        if __tmp.remaining() < Self::ENCODED_LEN {
17553            panic!(
17554                "buffer is too small (need {} bytes, but got {})",
17555                Self::ENCODED_LEN,
17556                __tmp.remaining(),
17557            )
17558        }
17559        __tmp.put_u64_le(self.time_usec);
17560        __tmp.put_f32_le(self.x);
17561        __tmp.put_f32_le(self.y);
17562        __tmp.put_f32_le(self.z);
17563        __tmp.put_f32_le(self.vx);
17564        __tmp.put_f32_le(self.vy);
17565        __tmp.put_f32_le(self.vz);
17566        __tmp.put_f32_le(self.ax);
17567        __tmp.put_f32_le(self.ay);
17568        __tmp.put_f32_le(self.az);
17569        for val in &self.covariance {
17570            __tmp.put_f32_le(*val);
17571        }
17572        __tmp.put_u8(self.estimator_type as u8);
17573        if matches!(version, MavlinkVersion::V2) {
17574            let len = __tmp.len();
17575            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17576        } else {
17577            __tmp.len()
17578        }
17579    }
17580}
17581#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17582#[doc = ""]
17583#[doc = "ID: 89"]
17584#[derive(Debug, Clone, PartialEq)]
17585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17587#[cfg_attr(feature = "ts", derive(TS))]
17588#[cfg_attr(feature = "ts", ts(export))]
17589pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17590    #[doc = "Timestamp (time since system boot)."]
17591    pub time_boot_ms: u32,
17592    #[doc = "X Position"]
17593    pub x: f32,
17594    #[doc = "Y Position"]
17595    pub y: f32,
17596    #[doc = "Z Position"]
17597    pub z: f32,
17598    #[doc = "Roll"]
17599    pub roll: f32,
17600    #[doc = "Pitch"]
17601    pub pitch: f32,
17602    #[doc = "Yaw"]
17603    pub yaw: f32,
17604}
17605impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17606    pub const ENCODED_LEN: usize = 28usize;
17607    pub const DEFAULT: Self = Self {
17608        time_boot_ms: 0_u32,
17609        x: 0.0_f32,
17610        y: 0.0_f32,
17611        z: 0.0_f32,
17612        roll: 0.0_f32,
17613        pitch: 0.0_f32,
17614        yaw: 0.0_f32,
17615    };
17616    #[cfg(feature = "arbitrary")]
17617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17618        use arbitrary::{Arbitrary, Unstructured};
17619        let mut buf = [0u8; 1024];
17620        rng.fill_bytes(&mut buf);
17621        let mut unstructured = Unstructured::new(&buf);
17622        Self::arbitrary(&mut unstructured).unwrap_or_default()
17623    }
17624}
17625impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17626    fn default() -> Self {
17627        Self::DEFAULT.clone()
17628    }
17629}
17630impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17631    type Message = MavMessage;
17632    const ID: u32 = 89u32;
17633    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17634    const EXTRA_CRC: u8 = 231u8;
17635    const ENCODED_LEN: usize = 28usize;
17636    fn deser(
17637        _version: MavlinkVersion,
17638        __input: &[u8],
17639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17640        let avail_len = __input.len();
17641        let mut payload_buf = [0; Self::ENCODED_LEN];
17642        let mut buf = if avail_len < Self::ENCODED_LEN {
17643            payload_buf[0..avail_len].copy_from_slice(__input);
17644            Bytes::new(&payload_buf)
17645        } else {
17646            Bytes::new(__input)
17647        };
17648        let mut __struct = Self::default();
17649        __struct.time_boot_ms = buf.get_u32_le()?;
17650        __struct.x = buf.get_f32_le()?;
17651        __struct.y = buf.get_f32_le()?;
17652        __struct.z = buf.get_f32_le()?;
17653        __struct.roll = buf.get_f32_le()?;
17654        __struct.pitch = buf.get_f32_le()?;
17655        __struct.yaw = buf.get_f32_le()?;
17656        Ok(__struct)
17657    }
17658    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17659        let mut __tmp = BytesMut::new(bytes);
17660        #[allow(clippy::absurd_extreme_comparisons)]
17661        #[allow(unused_comparisons)]
17662        if __tmp.remaining() < Self::ENCODED_LEN {
17663            panic!(
17664                "buffer is too small (need {} bytes, but got {})",
17665                Self::ENCODED_LEN,
17666                __tmp.remaining(),
17667            )
17668        }
17669        __tmp.put_u32_le(self.time_boot_ms);
17670        __tmp.put_f32_le(self.x);
17671        __tmp.put_f32_le(self.y);
17672        __tmp.put_f32_le(self.z);
17673        __tmp.put_f32_le(self.roll);
17674        __tmp.put_f32_le(self.pitch);
17675        __tmp.put_f32_le(self.yaw);
17676        if matches!(version, MavlinkVersion::V2) {
17677            let len = __tmp.len();
17678            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17679        } else {
17680            __tmp.len()
17681        }
17682    }
17683}
17684#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17685#[doc = ""]
17686#[doc = "ID: 268"]
17687#[derive(Debug, Clone, PartialEq)]
17688#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17689#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17690#[cfg_attr(feature = "ts", derive(TS))]
17691#[cfg_attr(feature = "ts", ts(export))]
17692pub struct LOGGING_ACK_DATA {
17693    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17694    pub sequence: u16,
17695    #[doc = "system ID of the target"]
17696    pub target_system: u8,
17697    #[doc = "component ID of the target"]
17698    pub target_component: u8,
17699}
17700impl LOGGING_ACK_DATA {
17701    pub const ENCODED_LEN: usize = 4usize;
17702    pub const DEFAULT: Self = Self {
17703        sequence: 0_u16,
17704        target_system: 0_u8,
17705        target_component: 0_u8,
17706    };
17707    #[cfg(feature = "arbitrary")]
17708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17709        use arbitrary::{Arbitrary, Unstructured};
17710        let mut buf = [0u8; 1024];
17711        rng.fill_bytes(&mut buf);
17712        let mut unstructured = Unstructured::new(&buf);
17713        Self::arbitrary(&mut unstructured).unwrap_or_default()
17714    }
17715}
17716impl Default for LOGGING_ACK_DATA {
17717    fn default() -> Self {
17718        Self::DEFAULT.clone()
17719    }
17720}
17721impl MessageData for LOGGING_ACK_DATA {
17722    type Message = MavMessage;
17723    const ID: u32 = 268u32;
17724    const NAME: &'static str = "LOGGING_ACK";
17725    const EXTRA_CRC: u8 = 14u8;
17726    const ENCODED_LEN: usize = 4usize;
17727    fn deser(
17728        _version: MavlinkVersion,
17729        __input: &[u8],
17730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17731        let avail_len = __input.len();
17732        let mut payload_buf = [0; Self::ENCODED_LEN];
17733        let mut buf = if avail_len < Self::ENCODED_LEN {
17734            payload_buf[0..avail_len].copy_from_slice(__input);
17735            Bytes::new(&payload_buf)
17736        } else {
17737            Bytes::new(__input)
17738        };
17739        let mut __struct = Self::default();
17740        __struct.sequence = buf.get_u16_le()?;
17741        __struct.target_system = buf.get_u8()?;
17742        __struct.target_component = buf.get_u8()?;
17743        Ok(__struct)
17744    }
17745    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17746        let mut __tmp = BytesMut::new(bytes);
17747        #[allow(clippy::absurd_extreme_comparisons)]
17748        #[allow(unused_comparisons)]
17749        if __tmp.remaining() < Self::ENCODED_LEN {
17750            panic!(
17751                "buffer is too small (need {} bytes, but got {})",
17752                Self::ENCODED_LEN,
17753                __tmp.remaining(),
17754            )
17755        }
17756        __tmp.put_u16_le(self.sequence);
17757        __tmp.put_u8(self.target_system);
17758        __tmp.put_u8(self.target_component);
17759        if matches!(version, MavlinkVersion::V2) {
17760            let len = __tmp.len();
17761            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17762        } else {
17763            __tmp.len()
17764        }
17765    }
17766}
17767#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
17768#[doc = ""]
17769#[doc = "ID: 266"]
17770#[derive(Debug, Clone, PartialEq)]
17771#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17772#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17773#[cfg_attr(feature = "ts", derive(TS))]
17774#[cfg_attr(feature = "ts", ts(export))]
17775pub struct LOGGING_DATA_DATA {
17776    #[doc = "sequence number (can wrap)"]
17777    pub sequence: u16,
17778    #[doc = "system ID of the target"]
17779    pub target_system: u8,
17780    #[doc = "component ID of the target"]
17781    pub target_component: u8,
17782    #[doc = "data length"]
17783    pub length: u8,
17784    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17785    pub first_message_offset: u8,
17786    #[doc = "logged data"]
17787    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17788    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17789    pub data: [u8; 249],
17790}
17791impl LOGGING_DATA_DATA {
17792    pub const ENCODED_LEN: usize = 255usize;
17793    pub const DEFAULT: Self = Self {
17794        sequence: 0_u16,
17795        target_system: 0_u8,
17796        target_component: 0_u8,
17797        length: 0_u8,
17798        first_message_offset: 0_u8,
17799        data: [0_u8; 249usize],
17800    };
17801    #[cfg(feature = "arbitrary")]
17802    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17803        use arbitrary::{Arbitrary, Unstructured};
17804        let mut buf = [0u8; 1024];
17805        rng.fill_bytes(&mut buf);
17806        let mut unstructured = Unstructured::new(&buf);
17807        Self::arbitrary(&mut unstructured).unwrap_or_default()
17808    }
17809}
17810impl Default for LOGGING_DATA_DATA {
17811    fn default() -> Self {
17812        Self::DEFAULT.clone()
17813    }
17814}
17815impl MessageData for LOGGING_DATA_DATA {
17816    type Message = MavMessage;
17817    const ID: u32 = 266u32;
17818    const NAME: &'static str = "LOGGING_DATA";
17819    const EXTRA_CRC: u8 = 193u8;
17820    const ENCODED_LEN: usize = 255usize;
17821    fn deser(
17822        _version: MavlinkVersion,
17823        __input: &[u8],
17824    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17825        let avail_len = __input.len();
17826        let mut payload_buf = [0; Self::ENCODED_LEN];
17827        let mut buf = if avail_len < Self::ENCODED_LEN {
17828            payload_buf[0..avail_len].copy_from_slice(__input);
17829            Bytes::new(&payload_buf)
17830        } else {
17831            Bytes::new(__input)
17832        };
17833        let mut __struct = Self::default();
17834        __struct.sequence = buf.get_u16_le()?;
17835        __struct.target_system = buf.get_u8()?;
17836        __struct.target_component = buf.get_u8()?;
17837        __struct.length = buf.get_u8()?;
17838        __struct.first_message_offset = buf.get_u8()?;
17839        for v in &mut __struct.data {
17840            let val = buf.get_u8()?;
17841            *v = val;
17842        }
17843        Ok(__struct)
17844    }
17845    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17846        let mut __tmp = BytesMut::new(bytes);
17847        #[allow(clippy::absurd_extreme_comparisons)]
17848        #[allow(unused_comparisons)]
17849        if __tmp.remaining() < Self::ENCODED_LEN {
17850            panic!(
17851                "buffer is too small (need {} bytes, but got {})",
17852                Self::ENCODED_LEN,
17853                __tmp.remaining(),
17854            )
17855        }
17856        __tmp.put_u16_le(self.sequence);
17857        __tmp.put_u8(self.target_system);
17858        __tmp.put_u8(self.target_component);
17859        __tmp.put_u8(self.length);
17860        __tmp.put_u8(self.first_message_offset);
17861        for val in &self.data {
17862            __tmp.put_u8(*val);
17863        }
17864        if matches!(version, MavlinkVersion::V2) {
17865            let len = __tmp.len();
17866            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17867        } else {
17868            __tmp.len()
17869        }
17870    }
17871}
17872#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
17873#[doc = ""]
17874#[doc = "ID: 267"]
17875#[derive(Debug, Clone, PartialEq)]
17876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17877#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17878#[cfg_attr(feature = "ts", derive(TS))]
17879#[cfg_attr(feature = "ts", ts(export))]
17880pub struct LOGGING_DATA_ACKED_DATA {
17881    #[doc = "sequence number (can wrap)"]
17882    pub sequence: u16,
17883    #[doc = "system ID of the target"]
17884    pub target_system: u8,
17885    #[doc = "component ID of the target"]
17886    pub target_component: u8,
17887    #[doc = "data length"]
17888    pub length: u8,
17889    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17890    pub first_message_offset: u8,
17891    #[doc = "logged data"]
17892    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17893    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17894    pub data: [u8; 249],
17895}
17896impl LOGGING_DATA_ACKED_DATA {
17897    pub const ENCODED_LEN: usize = 255usize;
17898    pub const DEFAULT: Self = Self {
17899        sequence: 0_u16,
17900        target_system: 0_u8,
17901        target_component: 0_u8,
17902        length: 0_u8,
17903        first_message_offset: 0_u8,
17904        data: [0_u8; 249usize],
17905    };
17906    #[cfg(feature = "arbitrary")]
17907    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17908        use arbitrary::{Arbitrary, Unstructured};
17909        let mut buf = [0u8; 1024];
17910        rng.fill_bytes(&mut buf);
17911        let mut unstructured = Unstructured::new(&buf);
17912        Self::arbitrary(&mut unstructured).unwrap_or_default()
17913    }
17914}
17915impl Default for LOGGING_DATA_ACKED_DATA {
17916    fn default() -> Self {
17917        Self::DEFAULT.clone()
17918    }
17919}
17920impl MessageData for LOGGING_DATA_ACKED_DATA {
17921    type Message = MavMessage;
17922    const ID: u32 = 267u32;
17923    const NAME: &'static str = "LOGGING_DATA_ACKED";
17924    const EXTRA_CRC: u8 = 35u8;
17925    const ENCODED_LEN: usize = 255usize;
17926    fn deser(
17927        _version: MavlinkVersion,
17928        __input: &[u8],
17929    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17930        let avail_len = __input.len();
17931        let mut payload_buf = [0; Self::ENCODED_LEN];
17932        let mut buf = if avail_len < Self::ENCODED_LEN {
17933            payload_buf[0..avail_len].copy_from_slice(__input);
17934            Bytes::new(&payload_buf)
17935        } else {
17936            Bytes::new(__input)
17937        };
17938        let mut __struct = Self::default();
17939        __struct.sequence = buf.get_u16_le()?;
17940        __struct.target_system = buf.get_u8()?;
17941        __struct.target_component = buf.get_u8()?;
17942        __struct.length = buf.get_u8()?;
17943        __struct.first_message_offset = buf.get_u8()?;
17944        for v in &mut __struct.data {
17945            let val = buf.get_u8()?;
17946            *v = val;
17947        }
17948        Ok(__struct)
17949    }
17950    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17951        let mut __tmp = BytesMut::new(bytes);
17952        #[allow(clippy::absurd_extreme_comparisons)]
17953        #[allow(unused_comparisons)]
17954        if __tmp.remaining() < Self::ENCODED_LEN {
17955            panic!(
17956                "buffer is too small (need {} bytes, but got {})",
17957                Self::ENCODED_LEN,
17958                __tmp.remaining(),
17959            )
17960        }
17961        __tmp.put_u16_le(self.sequence);
17962        __tmp.put_u8(self.target_system);
17963        __tmp.put_u8(self.target_component);
17964        __tmp.put_u8(self.length);
17965        __tmp.put_u8(self.first_message_offset);
17966        for val in &self.data {
17967            __tmp.put_u8(*val);
17968        }
17969        if matches!(version, MavlinkVersion::V2) {
17970            let len = __tmp.len();
17971            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17972        } else {
17973            __tmp.len()
17974        }
17975    }
17976}
17977#[doc = "Reply to LOG_REQUEST_DATA."]
17978#[doc = ""]
17979#[doc = "ID: 120"]
17980#[derive(Debug, Clone, PartialEq)]
17981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17983#[cfg_attr(feature = "ts", derive(TS))]
17984#[cfg_attr(feature = "ts", ts(export))]
17985pub struct LOG_DATA_DATA {
17986    #[doc = "Offset into the log"]
17987    pub ofs: u32,
17988    #[doc = "Log id (from LOG_ENTRY reply)"]
17989    pub id: u16,
17990    #[doc = "Number of bytes (zero for end of log)"]
17991    pub count: u8,
17992    #[doc = "log data"]
17993    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17994    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17995    pub data: [u8; 90],
17996}
17997impl LOG_DATA_DATA {
17998    pub const ENCODED_LEN: usize = 97usize;
17999    pub const DEFAULT: Self = Self {
18000        ofs: 0_u32,
18001        id: 0_u16,
18002        count: 0_u8,
18003        data: [0_u8; 90usize],
18004    };
18005    #[cfg(feature = "arbitrary")]
18006    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18007        use arbitrary::{Arbitrary, Unstructured};
18008        let mut buf = [0u8; 1024];
18009        rng.fill_bytes(&mut buf);
18010        let mut unstructured = Unstructured::new(&buf);
18011        Self::arbitrary(&mut unstructured).unwrap_or_default()
18012    }
18013}
18014impl Default for LOG_DATA_DATA {
18015    fn default() -> Self {
18016        Self::DEFAULT.clone()
18017    }
18018}
18019impl MessageData for LOG_DATA_DATA {
18020    type Message = MavMessage;
18021    const ID: u32 = 120u32;
18022    const NAME: &'static str = "LOG_DATA";
18023    const EXTRA_CRC: u8 = 134u8;
18024    const ENCODED_LEN: usize = 97usize;
18025    fn deser(
18026        _version: MavlinkVersion,
18027        __input: &[u8],
18028    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18029        let avail_len = __input.len();
18030        let mut payload_buf = [0; Self::ENCODED_LEN];
18031        let mut buf = if avail_len < Self::ENCODED_LEN {
18032            payload_buf[0..avail_len].copy_from_slice(__input);
18033            Bytes::new(&payload_buf)
18034        } else {
18035            Bytes::new(__input)
18036        };
18037        let mut __struct = Self::default();
18038        __struct.ofs = buf.get_u32_le()?;
18039        __struct.id = buf.get_u16_le()?;
18040        __struct.count = buf.get_u8()?;
18041        for v in &mut __struct.data {
18042            let val = buf.get_u8()?;
18043            *v = val;
18044        }
18045        Ok(__struct)
18046    }
18047    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18048        let mut __tmp = BytesMut::new(bytes);
18049        #[allow(clippy::absurd_extreme_comparisons)]
18050        #[allow(unused_comparisons)]
18051        if __tmp.remaining() < Self::ENCODED_LEN {
18052            panic!(
18053                "buffer is too small (need {} bytes, but got {})",
18054                Self::ENCODED_LEN,
18055                __tmp.remaining(),
18056            )
18057        }
18058        __tmp.put_u32_le(self.ofs);
18059        __tmp.put_u16_le(self.id);
18060        __tmp.put_u8(self.count);
18061        for val in &self.data {
18062            __tmp.put_u8(*val);
18063        }
18064        if matches!(version, MavlinkVersion::V2) {
18065            let len = __tmp.len();
18066            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18067        } else {
18068            __tmp.len()
18069        }
18070    }
18071}
18072#[doc = "Reply to LOG_REQUEST_LIST."]
18073#[doc = ""]
18074#[doc = "ID: 118"]
18075#[derive(Debug, Clone, PartialEq)]
18076#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18077#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18078#[cfg_attr(feature = "ts", derive(TS))]
18079#[cfg_attr(feature = "ts", ts(export))]
18080pub struct LOG_ENTRY_DATA {
18081    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18082    pub time_utc: u32,
18083    #[doc = "Size of the log (may be approximate)"]
18084    pub size: u32,
18085    #[doc = "Log id"]
18086    pub id: u16,
18087    #[doc = "Total number of logs"]
18088    pub num_logs: u16,
18089    #[doc = "High log number"]
18090    pub last_log_num: u16,
18091}
18092impl LOG_ENTRY_DATA {
18093    pub const ENCODED_LEN: usize = 14usize;
18094    pub const DEFAULT: Self = Self {
18095        time_utc: 0_u32,
18096        size: 0_u32,
18097        id: 0_u16,
18098        num_logs: 0_u16,
18099        last_log_num: 0_u16,
18100    };
18101    #[cfg(feature = "arbitrary")]
18102    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18103        use arbitrary::{Arbitrary, Unstructured};
18104        let mut buf = [0u8; 1024];
18105        rng.fill_bytes(&mut buf);
18106        let mut unstructured = Unstructured::new(&buf);
18107        Self::arbitrary(&mut unstructured).unwrap_or_default()
18108    }
18109}
18110impl Default for LOG_ENTRY_DATA {
18111    fn default() -> Self {
18112        Self::DEFAULT.clone()
18113    }
18114}
18115impl MessageData for LOG_ENTRY_DATA {
18116    type Message = MavMessage;
18117    const ID: u32 = 118u32;
18118    const NAME: &'static str = "LOG_ENTRY";
18119    const EXTRA_CRC: u8 = 56u8;
18120    const ENCODED_LEN: usize = 14usize;
18121    fn deser(
18122        _version: MavlinkVersion,
18123        __input: &[u8],
18124    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18125        let avail_len = __input.len();
18126        let mut payload_buf = [0; Self::ENCODED_LEN];
18127        let mut buf = if avail_len < Self::ENCODED_LEN {
18128            payload_buf[0..avail_len].copy_from_slice(__input);
18129            Bytes::new(&payload_buf)
18130        } else {
18131            Bytes::new(__input)
18132        };
18133        let mut __struct = Self::default();
18134        __struct.time_utc = buf.get_u32_le()?;
18135        __struct.size = buf.get_u32_le()?;
18136        __struct.id = buf.get_u16_le()?;
18137        __struct.num_logs = buf.get_u16_le()?;
18138        __struct.last_log_num = buf.get_u16_le()?;
18139        Ok(__struct)
18140    }
18141    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18142        let mut __tmp = BytesMut::new(bytes);
18143        #[allow(clippy::absurd_extreme_comparisons)]
18144        #[allow(unused_comparisons)]
18145        if __tmp.remaining() < Self::ENCODED_LEN {
18146            panic!(
18147                "buffer is too small (need {} bytes, but got {})",
18148                Self::ENCODED_LEN,
18149                __tmp.remaining(),
18150            )
18151        }
18152        __tmp.put_u32_le(self.time_utc);
18153        __tmp.put_u32_le(self.size);
18154        __tmp.put_u16_le(self.id);
18155        __tmp.put_u16_le(self.num_logs);
18156        __tmp.put_u16_le(self.last_log_num);
18157        if matches!(version, MavlinkVersion::V2) {
18158            let len = __tmp.len();
18159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18160        } else {
18161            __tmp.len()
18162        }
18163    }
18164}
18165#[doc = "Erase all logs."]
18166#[doc = ""]
18167#[doc = "ID: 121"]
18168#[derive(Debug, Clone, PartialEq)]
18169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18171#[cfg_attr(feature = "ts", derive(TS))]
18172#[cfg_attr(feature = "ts", ts(export))]
18173pub struct LOG_ERASE_DATA {
18174    #[doc = "System ID"]
18175    pub target_system: u8,
18176    #[doc = "Component ID"]
18177    pub target_component: u8,
18178}
18179impl LOG_ERASE_DATA {
18180    pub const ENCODED_LEN: usize = 2usize;
18181    pub const DEFAULT: Self = Self {
18182        target_system: 0_u8,
18183        target_component: 0_u8,
18184    };
18185    #[cfg(feature = "arbitrary")]
18186    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18187        use arbitrary::{Arbitrary, Unstructured};
18188        let mut buf = [0u8; 1024];
18189        rng.fill_bytes(&mut buf);
18190        let mut unstructured = Unstructured::new(&buf);
18191        Self::arbitrary(&mut unstructured).unwrap_or_default()
18192    }
18193}
18194impl Default for LOG_ERASE_DATA {
18195    fn default() -> Self {
18196        Self::DEFAULT.clone()
18197    }
18198}
18199impl MessageData for LOG_ERASE_DATA {
18200    type Message = MavMessage;
18201    const ID: u32 = 121u32;
18202    const NAME: &'static str = "LOG_ERASE";
18203    const EXTRA_CRC: u8 = 237u8;
18204    const ENCODED_LEN: usize = 2usize;
18205    fn deser(
18206        _version: MavlinkVersion,
18207        __input: &[u8],
18208    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18209        let avail_len = __input.len();
18210        let mut payload_buf = [0; Self::ENCODED_LEN];
18211        let mut buf = if avail_len < Self::ENCODED_LEN {
18212            payload_buf[0..avail_len].copy_from_slice(__input);
18213            Bytes::new(&payload_buf)
18214        } else {
18215            Bytes::new(__input)
18216        };
18217        let mut __struct = Self::default();
18218        __struct.target_system = buf.get_u8()?;
18219        __struct.target_component = buf.get_u8()?;
18220        Ok(__struct)
18221    }
18222    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18223        let mut __tmp = BytesMut::new(bytes);
18224        #[allow(clippy::absurd_extreme_comparisons)]
18225        #[allow(unused_comparisons)]
18226        if __tmp.remaining() < Self::ENCODED_LEN {
18227            panic!(
18228                "buffer is too small (need {} bytes, but got {})",
18229                Self::ENCODED_LEN,
18230                __tmp.remaining(),
18231            )
18232        }
18233        __tmp.put_u8(self.target_system);
18234        __tmp.put_u8(self.target_component);
18235        if matches!(version, MavlinkVersion::V2) {
18236            let len = __tmp.len();
18237            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18238        } else {
18239            __tmp.len()
18240        }
18241    }
18242}
18243#[doc = "Request a chunk of a log."]
18244#[doc = ""]
18245#[doc = "ID: 119"]
18246#[derive(Debug, Clone, PartialEq)]
18247#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18248#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18249#[cfg_attr(feature = "ts", derive(TS))]
18250#[cfg_attr(feature = "ts", ts(export))]
18251pub struct LOG_REQUEST_DATA_DATA {
18252    #[doc = "Offset into the log"]
18253    pub ofs: u32,
18254    #[doc = "Number of bytes"]
18255    pub count: u32,
18256    #[doc = "Log id (from LOG_ENTRY reply)"]
18257    pub id: u16,
18258    #[doc = "System ID"]
18259    pub target_system: u8,
18260    #[doc = "Component ID"]
18261    pub target_component: u8,
18262}
18263impl LOG_REQUEST_DATA_DATA {
18264    pub const ENCODED_LEN: usize = 12usize;
18265    pub const DEFAULT: Self = Self {
18266        ofs: 0_u32,
18267        count: 0_u32,
18268        id: 0_u16,
18269        target_system: 0_u8,
18270        target_component: 0_u8,
18271    };
18272    #[cfg(feature = "arbitrary")]
18273    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18274        use arbitrary::{Arbitrary, Unstructured};
18275        let mut buf = [0u8; 1024];
18276        rng.fill_bytes(&mut buf);
18277        let mut unstructured = Unstructured::new(&buf);
18278        Self::arbitrary(&mut unstructured).unwrap_or_default()
18279    }
18280}
18281impl Default for LOG_REQUEST_DATA_DATA {
18282    fn default() -> Self {
18283        Self::DEFAULT.clone()
18284    }
18285}
18286impl MessageData for LOG_REQUEST_DATA_DATA {
18287    type Message = MavMessage;
18288    const ID: u32 = 119u32;
18289    const NAME: &'static str = "LOG_REQUEST_DATA";
18290    const EXTRA_CRC: u8 = 116u8;
18291    const ENCODED_LEN: usize = 12usize;
18292    fn deser(
18293        _version: MavlinkVersion,
18294        __input: &[u8],
18295    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18296        let avail_len = __input.len();
18297        let mut payload_buf = [0; Self::ENCODED_LEN];
18298        let mut buf = if avail_len < Self::ENCODED_LEN {
18299            payload_buf[0..avail_len].copy_from_slice(__input);
18300            Bytes::new(&payload_buf)
18301        } else {
18302            Bytes::new(__input)
18303        };
18304        let mut __struct = Self::default();
18305        __struct.ofs = buf.get_u32_le()?;
18306        __struct.count = buf.get_u32_le()?;
18307        __struct.id = buf.get_u16_le()?;
18308        __struct.target_system = buf.get_u8()?;
18309        __struct.target_component = buf.get_u8()?;
18310        Ok(__struct)
18311    }
18312    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18313        let mut __tmp = BytesMut::new(bytes);
18314        #[allow(clippy::absurd_extreme_comparisons)]
18315        #[allow(unused_comparisons)]
18316        if __tmp.remaining() < Self::ENCODED_LEN {
18317            panic!(
18318                "buffer is too small (need {} bytes, but got {})",
18319                Self::ENCODED_LEN,
18320                __tmp.remaining(),
18321            )
18322        }
18323        __tmp.put_u32_le(self.ofs);
18324        __tmp.put_u32_le(self.count);
18325        __tmp.put_u16_le(self.id);
18326        __tmp.put_u8(self.target_system);
18327        __tmp.put_u8(self.target_component);
18328        if matches!(version, MavlinkVersion::V2) {
18329            let len = __tmp.len();
18330            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18331        } else {
18332            __tmp.len()
18333        }
18334    }
18335}
18336#[doc = "Stop log transfer and resume normal logging."]
18337#[doc = ""]
18338#[doc = "ID: 122"]
18339#[derive(Debug, Clone, PartialEq)]
18340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18342#[cfg_attr(feature = "ts", derive(TS))]
18343#[cfg_attr(feature = "ts", ts(export))]
18344pub struct LOG_REQUEST_END_DATA {
18345    #[doc = "System ID"]
18346    pub target_system: u8,
18347    #[doc = "Component ID"]
18348    pub target_component: u8,
18349}
18350impl LOG_REQUEST_END_DATA {
18351    pub const ENCODED_LEN: usize = 2usize;
18352    pub const DEFAULT: Self = Self {
18353        target_system: 0_u8,
18354        target_component: 0_u8,
18355    };
18356    #[cfg(feature = "arbitrary")]
18357    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18358        use arbitrary::{Arbitrary, Unstructured};
18359        let mut buf = [0u8; 1024];
18360        rng.fill_bytes(&mut buf);
18361        let mut unstructured = Unstructured::new(&buf);
18362        Self::arbitrary(&mut unstructured).unwrap_or_default()
18363    }
18364}
18365impl Default for LOG_REQUEST_END_DATA {
18366    fn default() -> Self {
18367        Self::DEFAULT.clone()
18368    }
18369}
18370impl MessageData for LOG_REQUEST_END_DATA {
18371    type Message = MavMessage;
18372    const ID: u32 = 122u32;
18373    const NAME: &'static str = "LOG_REQUEST_END";
18374    const EXTRA_CRC: u8 = 203u8;
18375    const ENCODED_LEN: usize = 2usize;
18376    fn deser(
18377        _version: MavlinkVersion,
18378        __input: &[u8],
18379    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18380        let avail_len = __input.len();
18381        let mut payload_buf = [0; Self::ENCODED_LEN];
18382        let mut buf = if avail_len < Self::ENCODED_LEN {
18383            payload_buf[0..avail_len].copy_from_slice(__input);
18384            Bytes::new(&payload_buf)
18385        } else {
18386            Bytes::new(__input)
18387        };
18388        let mut __struct = Self::default();
18389        __struct.target_system = buf.get_u8()?;
18390        __struct.target_component = buf.get_u8()?;
18391        Ok(__struct)
18392    }
18393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18394        let mut __tmp = BytesMut::new(bytes);
18395        #[allow(clippy::absurd_extreme_comparisons)]
18396        #[allow(unused_comparisons)]
18397        if __tmp.remaining() < Self::ENCODED_LEN {
18398            panic!(
18399                "buffer is too small (need {} bytes, but got {})",
18400                Self::ENCODED_LEN,
18401                __tmp.remaining(),
18402            )
18403        }
18404        __tmp.put_u8(self.target_system);
18405        __tmp.put_u8(self.target_component);
18406        if matches!(version, MavlinkVersion::V2) {
18407            let len = __tmp.len();
18408            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18409        } else {
18410            __tmp.len()
18411        }
18412    }
18413}
18414#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18415#[doc = ""]
18416#[doc = "ID: 117"]
18417#[derive(Debug, Clone, PartialEq)]
18418#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18420#[cfg_attr(feature = "ts", derive(TS))]
18421#[cfg_attr(feature = "ts", ts(export))]
18422pub struct LOG_REQUEST_LIST_DATA {
18423    #[doc = "First log id (0 for first available)"]
18424    pub start: u16,
18425    #[doc = "Last log id (0xffff for last available)"]
18426    pub end: u16,
18427    #[doc = "System ID"]
18428    pub target_system: u8,
18429    #[doc = "Component ID"]
18430    pub target_component: u8,
18431}
18432impl LOG_REQUEST_LIST_DATA {
18433    pub const ENCODED_LEN: usize = 6usize;
18434    pub const DEFAULT: Self = Self {
18435        start: 0_u16,
18436        end: 0_u16,
18437        target_system: 0_u8,
18438        target_component: 0_u8,
18439    };
18440    #[cfg(feature = "arbitrary")]
18441    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18442        use arbitrary::{Arbitrary, Unstructured};
18443        let mut buf = [0u8; 1024];
18444        rng.fill_bytes(&mut buf);
18445        let mut unstructured = Unstructured::new(&buf);
18446        Self::arbitrary(&mut unstructured).unwrap_or_default()
18447    }
18448}
18449impl Default for LOG_REQUEST_LIST_DATA {
18450    fn default() -> Self {
18451        Self::DEFAULT.clone()
18452    }
18453}
18454impl MessageData for LOG_REQUEST_LIST_DATA {
18455    type Message = MavMessage;
18456    const ID: u32 = 117u32;
18457    const NAME: &'static str = "LOG_REQUEST_LIST";
18458    const EXTRA_CRC: u8 = 128u8;
18459    const ENCODED_LEN: usize = 6usize;
18460    fn deser(
18461        _version: MavlinkVersion,
18462        __input: &[u8],
18463    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18464        let avail_len = __input.len();
18465        let mut payload_buf = [0; Self::ENCODED_LEN];
18466        let mut buf = if avail_len < Self::ENCODED_LEN {
18467            payload_buf[0..avail_len].copy_from_slice(__input);
18468            Bytes::new(&payload_buf)
18469        } else {
18470            Bytes::new(__input)
18471        };
18472        let mut __struct = Self::default();
18473        __struct.start = buf.get_u16_le()?;
18474        __struct.end = buf.get_u16_le()?;
18475        __struct.target_system = buf.get_u8()?;
18476        __struct.target_component = buf.get_u8()?;
18477        Ok(__struct)
18478    }
18479    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18480        let mut __tmp = BytesMut::new(bytes);
18481        #[allow(clippy::absurd_extreme_comparisons)]
18482        #[allow(unused_comparisons)]
18483        if __tmp.remaining() < Self::ENCODED_LEN {
18484            panic!(
18485                "buffer is too small (need {} bytes, but got {})",
18486                Self::ENCODED_LEN,
18487                __tmp.remaining(),
18488            )
18489        }
18490        __tmp.put_u16_le(self.start);
18491        __tmp.put_u16_le(self.end);
18492        __tmp.put_u8(self.target_system);
18493        __tmp.put_u8(self.target_component);
18494        if matches!(version, MavlinkVersion::V2) {
18495            let len = __tmp.len();
18496            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18497        } else {
18498            __tmp.len()
18499        }
18500    }
18501}
18502#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18503#[doc = ""]
18504#[doc = "ID: 192"]
18505#[derive(Debug, Clone, PartialEq)]
18506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18508#[cfg_attr(feature = "ts", derive(TS))]
18509#[cfg_attr(feature = "ts", ts(export))]
18510pub struct MAG_CAL_REPORT_DATA {
18511    #[doc = "RMS milligauss residuals."]
18512    pub fitness: f32,
18513    #[doc = "X offset."]
18514    pub ofs_x: f32,
18515    #[doc = "Y offset."]
18516    pub ofs_y: f32,
18517    #[doc = "Z offset."]
18518    pub ofs_z: f32,
18519    #[doc = "X diagonal (matrix 11)."]
18520    pub diag_x: f32,
18521    #[doc = "Y diagonal (matrix 22)."]
18522    pub diag_y: f32,
18523    #[doc = "Z diagonal (matrix 33)."]
18524    pub diag_z: f32,
18525    #[doc = "X off-diagonal (matrix 12 and 21)."]
18526    pub offdiag_x: f32,
18527    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18528    pub offdiag_y: f32,
18529    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18530    pub offdiag_z: f32,
18531    #[doc = "Compass being calibrated."]
18532    pub compass_id: u8,
18533    #[doc = "Bitmask of compasses being calibrated."]
18534    pub cal_mask: u8,
18535    #[doc = "Calibration Status."]
18536    pub cal_status: MagCalStatus,
18537    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18538    pub autosaved: u8,
18539    #[doc = "Confidence in orientation (higher is better)."]
18540    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18541    pub orientation_confidence: f32,
18542    #[doc = "orientation before calibration."]
18543    #[cfg_attr(feature = "serde", serde(default))]
18544    pub old_orientation: MavSensorOrientation,
18545    #[doc = "orientation after calibration."]
18546    #[cfg_attr(feature = "serde", serde(default))]
18547    pub new_orientation: MavSensorOrientation,
18548    #[doc = "field radius correction factor"]
18549    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18550    pub scale_factor: f32,
18551}
18552impl MAG_CAL_REPORT_DATA {
18553    pub const ENCODED_LEN: usize = 54usize;
18554    pub const DEFAULT: Self = Self {
18555        fitness: 0.0_f32,
18556        ofs_x: 0.0_f32,
18557        ofs_y: 0.0_f32,
18558        ofs_z: 0.0_f32,
18559        diag_x: 0.0_f32,
18560        diag_y: 0.0_f32,
18561        diag_z: 0.0_f32,
18562        offdiag_x: 0.0_f32,
18563        offdiag_y: 0.0_f32,
18564        offdiag_z: 0.0_f32,
18565        compass_id: 0_u8,
18566        cal_mask: 0_u8,
18567        cal_status: MagCalStatus::DEFAULT,
18568        autosaved: 0_u8,
18569        orientation_confidence: 0.0_f32,
18570        old_orientation: MavSensorOrientation::DEFAULT,
18571        new_orientation: MavSensorOrientation::DEFAULT,
18572        scale_factor: 0.0_f32,
18573    };
18574    #[cfg(feature = "arbitrary")]
18575    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18576        use arbitrary::{Arbitrary, Unstructured};
18577        let mut buf = [0u8; 1024];
18578        rng.fill_bytes(&mut buf);
18579        let mut unstructured = Unstructured::new(&buf);
18580        Self::arbitrary(&mut unstructured).unwrap_or_default()
18581    }
18582}
18583impl Default for MAG_CAL_REPORT_DATA {
18584    fn default() -> Self {
18585        Self::DEFAULT.clone()
18586    }
18587}
18588impl MessageData for MAG_CAL_REPORT_DATA {
18589    type Message = MavMessage;
18590    const ID: u32 = 192u32;
18591    const NAME: &'static str = "MAG_CAL_REPORT";
18592    const EXTRA_CRC: u8 = 36u8;
18593    const ENCODED_LEN: usize = 54usize;
18594    fn deser(
18595        _version: MavlinkVersion,
18596        __input: &[u8],
18597    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18598        let avail_len = __input.len();
18599        let mut payload_buf = [0; Self::ENCODED_LEN];
18600        let mut buf = if avail_len < Self::ENCODED_LEN {
18601            payload_buf[0..avail_len].copy_from_slice(__input);
18602            Bytes::new(&payload_buf)
18603        } else {
18604            Bytes::new(__input)
18605        };
18606        let mut __struct = Self::default();
18607        __struct.fitness = buf.get_f32_le()?;
18608        __struct.ofs_x = buf.get_f32_le()?;
18609        __struct.ofs_y = buf.get_f32_le()?;
18610        __struct.ofs_z = buf.get_f32_le()?;
18611        __struct.diag_x = buf.get_f32_le()?;
18612        __struct.diag_y = buf.get_f32_le()?;
18613        __struct.diag_z = buf.get_f32_le()?;
18614        __struct.offdiag_x = buf.get_f32_le()?;
18615        __struct.offdiag_y = buf.get_f32_le()?;
18616        __struct.offdiag_z = buf.get_f32_le()?;
18617        __struct.compass_id = buf.get_u8()?;
18618        __struct.cal_mask = buf.get_u8()?;
18619        let tmp = buf.get_u8()?;
18620        __struct.cal_status =
18621            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18622                enum_type: "MagCalStatus",
18623                value: tmp as u64,
18624            })?;
18625        __struct.autosaved = buf.get_u8()?;
18626        __struct.orientation_confidence = buf.get_f32_le()?;
18627        let tmp = buf.get_u8()?;
18628        __struct.old_orientation =
18629            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18630                enum_type: "MavSensorOrientation",
18631                value: tmp as u64,
18632            })?;
18633        let tmp = buf.get_u8()?;
18634        __struct.new_orientation =
18635            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18636                enum_type: "MavSensorOrientation",
18637                value: tmp as u64,
18638            })?;
18639        __struct.scale_factor = buf.get_f32_le()?;
18640        Ok(__struct)
18641    }
18642    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18643        let mut __tmp = BytesMut::new(bytes);
18644        #[allow(clippy::absurd_extreme_comparisons)]
18645        #[allow(unused_comparisons)]
18646        if __tmp.remaining() < Self::ENCODED_LEN {
18647            panic!(
18648                "buffer is too small (need {} bytes, but got {})",
18649                Self::ENCODED_LEN,
18650                __tmp.remaining(),
18651            )
18652        }
18653        __tmp.put_f32_le(self.fitness);
18654        __tmp.put_f32_le(self.ofs_x);
18655        __tmp.put_f32_le(self.ofs_y);
18656        __tmp.put_f32_le(self.ofs_z);
18657        __tmp.put_f32_le(self.diag_x);
18658        __tmp.put_f32_le(self.diag_y);
18659        __tmp.put_f32_le(self.diag_z);
18660        __tmp.put_f32_le(self.offdiag_x);
18661        __tmp.put_f32_le(self.offdiag_y);
18662        __tmp.put_f32_le(self.offdiag_z);
18663        __tmp.put_u8(self.compass_id);
18664        __tmp.put_u8(self.cal_mask);
18665        __tmp.put_u8(self.cal_status as u8);
18666        __tmp.put_u8(self.autosaved);
18667        if matches!(version, MavlinkVersion::V2) {
18668            __tmp.put_f32_le(self.orientation_confidence);
18669            __tmp.put_u8(self.old_orientation as u8);
18670            __tmp.put_u8(self.new_orientation as u8);
18671            __tmp.put_f32_le(self.scale_factor);
18672            let len = __tmp.len();
18673            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18674        } else {
18675            __tmp.len()
18676        }
18677    }
18678}
18679#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18680#[doc = ""]
18681#[doc = "ID: 69"]
18682#[derive(Debug, Clone, PartialEq)]
18683#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18685#[cfg_attr(feature = "ts", derive(TS))]
18686#[cfg_attr(feature = "ts", ts(export))]
18687pub struct MANUAL_CONTROL_DATA {
18688    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18689    pub x: i16,
18690    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18691    pub y: i16,
18692    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18693    pub z: i16,
18694    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18695    pub r: i16,
18696    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18697    pub buttons: u16,
18698    #[doc = "The system to be controlled."]
18699    pub target: u8,
18700    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18701    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18702    pub buttons2: u16,
18703    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18704    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18705    pub enabled_extensions: u8,
18706    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18707    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18708    pub s: i16,
18709    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18710    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18711    pub t: i16,
18712    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18713    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18714    pub aux1: i16,
18715    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18716    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18717    pub aux2: i16,
18718    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18719    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18720    pub aux3: i16,
18721    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18722    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18723    pub aux4: i16,
18724    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18725    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18726    pub aux5: i16,
18727    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18728    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18729    pub aux6: i16,
18730}
18731impl MANUAL_CONTROL_DATA {
18732    pub const ENCODED_LEN: usize = 30usize;
18733    pub const DEFAULT: Self = Self {
18734        x: 0_i16,
18735        y: 0_i16,
18736        z: 0_i16,
18737        r: 0_i16,
18738        buttons: 0_u16,
18739        target: 0_u8,
18740        buttons2: 0_u16,
18741        enabled_extensions: 0_u8,
18742        s: 0_i16,
18743        t: 0_i16,
18744        aux1: 0_i16,
18745        aux2: 0_i16,
18746        aux3: 0_i16,
18747        aux4: 0_i16,
18748        aux5: 0_i16,
18749        aux6: 0_i16,
18750    };
18751    #[cfg(feature = "arbitrary")]
18752    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18753        use arbitrary::{Arbitrary, Unstructured};
18754        let mut buf = [0u8; 1024];
18755        rng.fill_bytes(&mut buf);
18756        let mut unstructured = Unstructured::new(&buf);
18757        Self::arbitrary(&mut unstructured).unwrap_or_default()
18758    }
18759}
18760impl Default for MANUAL_CONTROL_DATA {
18761    fn default() -> Self {
18762        Self::DEFAULT.clone()
18763    }
18764}
18765impl MessageData for MANUAL_CONTROL_DATA {
18766    type Message = MavMessage;
18767    const ID: u32 = 69u32;
18768    const NAME: &'static str = "MANUAL_CONTROL";
18769    const EXTRA_CRC: u8 = 243u8;
18770    const ENCODED_LEN: usize = 30usize;
18771    fn deser(
18772        _version: MavlinkVersion,
18773        __input: &[u8],
18774    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18775        let avail_len = __input.len();
18776        let mut payload_buf = [0; Self::ENCODED_LEN];
18777        let mut buf = if avail_len < Self::ENCODED_LEN {
18778            payload_buf[0..avail_len].copy_from_slice(__input);
18779            Bytes::new(&payload_buf)
18780        } else {
18781            Bytes::new(__input)
18782        };
18783        let mut __struct = Self::default();
18784        __struct.x = buf.get_i16_le()?;
18785        __struct.y = buf.get_i16_le()?;
18786        __struct.z = buf.get_i16_le()?;
18787        __struct.r = buf.get_i16_le()?;
18788        __struct.buttons = buf.get_u16_le()?;
18789        __struct.target = buf.get_u8()?;
18790        __struct.buttons2 = buf.get_u16_le()?;
18791        __struct.enabled_extensions = buf.get_u8()?;
18792        __struct.s = buf.get_i16_le()?;
18793        __struct.t = buf.get_i16_le()?;
18794        __struct.aux1 = buf.get_i16_le()?;
18795        __struct.aux2 = buf.get_i16_le()?;
18796        __struct.aux3 = buf.get_i16_le()?;
18797        __struct.aux4 = buf.get_i16_le()?;
18798        __struct.aux5 = buf.get_i16_le()?;
18799        __struct.aux6 = buf.get_i16_le()?;
18800        Ok(__struct)
18801    }
18802    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18803        let mut __tmp = BytesMut::new(bytes);
18804        #[allow(clippy::absurd_extreme_comparisons)]
18805        #[allow(unused_comparisons)]
18806        if __tmp.remaining() < Self::ENCODED_LEN {
18807            panic!(
18808                "buffer is too small (need {} bytes, but got {})",
18809                Self::ENCODED_LEN,
18810                __tmp.remaining(),
18811            )
18812        }
18813        __tmp.put_i16_le(self.x);
18814        __tmp.put_i16_le(self.y);
18815        __tmp.put_i16_le(self.z);
18816        __tmp.put_i16_le(self.r);
18817        __tmp.put_u16_le(self.buttons);
18818        __tmp.put_u8(self.target);
18819        if matches!(version, MavlinkVersion::V2) {
18820            __tmp.put_u16_le(self.buttons2);
18821            __tmp.put_u8(self.enabled_extensions);
18822            __tmp.put_i16_le(self.s);
18823            __tmp.put_i16_le(self.t);
18824            __tmp.put_i16_le(self.aux1);
18825            __tmp.put_i16_le(self.aux2);
18826            __tmp.put_i16_le(self.aux3);
18827            __tmp.put_i16_le(self.aux4);
18828            __tmp.put_i16_le(self.aux5);
18829            __tmp.put_i16_le(self.aux6);
18830            let len = __tmp.len();
18831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18832        } else {
18833            __tmp.len()
18834        }
18835    }
18836}
18837#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
18838#[doc = ""]
18839#[doc = "ID: 81"]
18840#[derive(Debug, Clone, PartialEq)]
18841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18843#[cfg_attr(feature = "ts", derive(TS))]
18844#[cfg_attr(feature = "ts", ts(export))]
18845pub struct MANUAL_SETPOINT_DATA {
18846    #[doc = "Timestamp (time since system boot)."]
18847    pub time_boot_ms: u32,
18848    #[doc = "Desired roll rate"]
18849    pub roll: f32,
18850    #[doc = "Desired pitch rate"]
18851    pub pitch: f32,
18852    #[doc = "Desired yaw rate"]
18853    pub yaw: f32,
18854    #[doc = "Collective thrust, normalized to 0 .. 1"]
18855    pub thrust: f32,
18856    #[doc = "Flight mode switch position, 0.. 255"]
18857    pub mode_switch: u8,
18858    #[doc = "Override mode switch position, 0.. 255"]
18859    pub manual_override_switch: u8,
18860}
18861impl MANUAL_SETPOINT_DATA {
18862    pub const ENCODED_LEN: usize = 22usize;
18863    pub const DEFAULT: Self = Self {
18864        time_boot_ms: 0_u32,
18865        roll: 0.0_f32,
18866        pitch: 0.0_f32,
18867        yaw: 0.0_f32,
18868        thrust: 0.0_f32,
18869        mode_switch: 0_u8,
18870        manual_override_switch: 0_u8,
18871    };
18872    #[cfg(feature = "arbitrary")]
18873    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18874        use arbitrary::{Arbitrary, Unstructured};
18875        let mut buf = [0u8; 1024];
18876        rng.fill_bytes(&mut buf);
18877        let mut unstructured = Unstructured::new(&buf);
18878        Self::arbitrary(&mut unstructured).unwrap_or_default()
18879    }
18880}
18881impl Default for MANUAL_SETPOINT_DATA {
18882    fn default() -> Self {
18883        Self::DEFAULT.clone()
18884    }
18885}
18886impl MessageData for MANUAL_SETPOINT_DATA {
18887    type Message = MavMessage;
18888    const ID: u32 = 81u32;
18889    const NAME: &'static str = "MANUAL_SETPOINT";
18890    const EXTRA_CRC: u8 = 106u8;
18891    const ENCODED_LEN: usize = 22usize;
18892    fn deser(
18893        _version: MavlinkVersion,
18894        __input: &[u8],
18895    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18896        let avail_len = __input.len();
18897        let mut payload_buf = [0; Self::ENCODED_LEN];
18898        let mut buf = if avail_len < Self::ENCODED_LEN {
18899            payload_buf[0..avail_len].copy_from_slice(__input);
18900            Bytes::new(&payload_buf)
18901        } else {
18902            Bytes::new(__input)
18903        };
18904        let mut __struct = Self::default();
18905        __struct.time_boot_ms = buf.get_u32_le()?;
18906        __struct.roll = buf.get_f32_le()?;
18907        __struct.pitch = buf.get_f32_le()?;
18908        __struct.yaw = buf.get_f32_le()?;
18909        __struct.thrust = buf.get_f32_le()?;
18910        __struct.mode_switch = buf.get_u8()?;
18911        __struct.manual_override_switch = buf.get_u8()?;
18912        Ok(__struct)
18913    }
18914    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18915        let mut __tmp = BytesMut::new(bytes);
18916        #[allow(clippy::absurd_extreme_comparisons)]
18917        #[allow(unused_comparisons)]
18918        if __tmp.remaining() < Self::ENCODED_LEN {
18919            panic!(
18920                "buffer is too small (need {} bytes, but got {})",
18921                Self::ENCODED_LEN,
18922                __tmp.remaining(),
18923            )
18924        }
18925        __tmp.put_u32_le(self.time_boot_ms);
18926        __tmp.put_f32_le(self.roll);
18927        __tmp.put_f32_le(self.pitch);
18928        __tmp.put_f32_le(self.yaw);
18929        __tmp.put_f32_le(self.thrust);
18930        __tmp.put_u8(self.mode_switch);
18931        __tmp.put_u8(self.manual_override_switch);
18932        if matches!(version, MavlinkVersion::V2) {
18933            let len = __tmp.len();
18934            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18935        } else {
18936            __tmp.len()
18937        }
18938    }
18939}
18940#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
18941#[doc = ""]
18942#[doc = "ID: 249"]
18943#[derive(Debug, Clone, PartialEq)]
18944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18946#[cfg_attr(feature = "ts", derive(TS))]
18947#[cfg_attr(feature = "ts", ts(export))]
18948pub struct MEMORY_VECT_DATA {
18949    #[doc = "Starting address of the debug variables"]
18950    pub address: u16,
18951    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
18952    pub ver: u8,
18953    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
18954    pub mavtype: u8,
18955    #[doc = "Memory contents at specified address"]
18956    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18957    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18958    pub value: [i8; 32],
18959}
18960impl MEMORY_VECT_DATA {
18961    pub const ENCODED_LEN: usize = 36usize;
18962    pub const DEFAULT: Self = Self {
18963        address: 0_u16,
18964        ver: 0_u8,
18965        mavtype: 0_u8,
18966        value: [0_i8; 32usize],
18967    };
18968    #[cfg(feature = "arbitrary")]
18969    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18970        use arbitrary::{Arbitrary, Unstructured};
18971        let mut buf = [0u8; 1024];
18972        rng.fill_bytes(&mut buf);
18973        let mut unstructured = Unstructured::new(&buf);
18974        Self::arbitrary(&mut unstructured).unwrap_or_default()
18975    }
18976}
18977impl Default for MEMORY_VECT_DATA {
18978    fn default() -> Self {
18979        Self::DEFAULT.clone()
18980    }
18981}
18982impl MessageData for MEMORY_VECT_DATA {
18983    type Message = MavMessage;
18984    const ID: u32 = 249u32;
18985    const NAME: &'static str = "MEMORY_VECT";
18986    const EXTRA_CRC: u8 = 204u8;
18987    const ENCODED_LEN: usize = 36usize;
18988    fn deser(
18989        _version: MavlinkVersion,
18990        __input: &[u8],
18991    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18992        let avail_len = __input.len();
18993        let mut payload_buf = [0; Self::ENCODED_LEN];
18994        let mut buf = if avail_len < Self::ENCODED_LEN {
18995            payload_buf[0..avail_len].copy_from_slice(__input);
18996            Bytes::new(&payload_buf)
18997        } else {
18998            Bytes::new(__input)
18999        };
19000        let mut __struct = Self::default();
19001        __struct.address = buf.get_u16_le()?;
19002        __struct.ver = buf.get_u8()?;
19003        __struct.mavtype = buf.get_u8()?;
19004        for v in &mut __struct.value {
19005            let val = buf.get_i8()?;
19006            *v = val;
19007        }
19008        Ok(__struct)
19009    }
19010    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19011        let mut __tmp = BytesMut::new(bytes);
19012        #[allow(clippy::absurd_extreme_comparisons)]
19013        #[allow(unused_comparisons)]
19014        if __tmp.remaining() < Self::ENCODED_LEN {
19015            panic!(
19016                "buffer is too small (need {} bytes, but got {})",
19017                Self::ENCODED_LEN,
19018                __tmp.remaining(),
19019            )
19020        }
19021        __tmp.put_u16_le(self.address);
19022        __tmp.put_u8(self.ver);
19023        __tmp.put_u8(self.mavtype);
19024        for val in &self.value {
19025            __tmp.put_i8(*val);
19026        }
19027        if matches!(version, MavlinkVersion::V2) {
19028            let len = __tmp.len();
19029            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19030        } else {
19031            __tmp.len()
19032        }
19033    }
19034}
19035#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19036#[doc = ""]
19037#[doc = "ID: 244"]
19038#[derive(Debug, Clone, PartialEq)]
19039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19040#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19041#[cfg_attr(feature = "ts", derive(TS))]
19042#[cfg_attr(feature = "ts", ts(export))]
19043pub struct MESSAGE_INTERVAL_DATA {
19044    #[doc = "0 indicates the interval at which it is sent."]
19045    pub interval_us: i32,
19046    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19047    pub message_id: u16,
19048}
19049impl MESSAGE_INTERVAL_DATA {
19050    pub const ENCODED_LEN: usize = 6usize;
19051    pub const DEFAULT: Self = Self {
19052        interval_us: 0_i32,
19053        message_id: 0_u16,
19054    };
19055    #[cfg(feature = "arbitrary")]
19056    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19057        use arbitrary::{Arbitrary, Unstructured};
19058        let mut buf = [0u8; 1024];
19059        rng.fill_bytes(&mut buf);
19060        let mut unstructured = Unstructured::new(&buf);
19061        Self::arbitrary(&mut unstructured).unwrap_or_default()
19062    }
19063}
19064impl Default for MESSAGE_INTERVAL_DATA {
19065    fn default() -> Self {
19066        Self::DEFAULT.clone()
19067    }
19068}
19069impl MessageData for MESSAGE_INTERVAL_DATA {
19070    type Message = MavMessage;
19071    const ID: u32 = 244u32;
19072    const NAME: &'static str = "MESSAGE_INTERVAL";
19073    const EXTRA_CRC: u8 = 95u8;
19074    const ENCODED_LEN: usize = 6usize;
19075    fn deser(
19076        _version: MavlinkVersion,
19077        __input: &[u8],
19078    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19079        let avail_len = __input.len();
19080        let mut payload_buf = [0; Self::ENCODED_LEN];
19081        let mut buf = if avail_len < Self::ENCODED_LEN {
19082            payload_buf[0..avail_len].copy_from_slice(__input);
19083            Bytes::new(&payload_buf)
19084        } else {
19085            Bytes::new(__input)
19086        };
19087        let mut __struct = Self::default();
19088        __struct.interval_us = buf.get_i32_le()?;
19089        __struct.message_id = buf.get_u16_le()?;
19090        Ok(__struct)
19091    }
19092    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19093        let mut __tmp = BytesMut::new(bytes);
19094        #[allow(clippy::absurd_extreme_comparisons)]
19095        #[allow(unused_comparisons)]
19096        if __tmp.remaining() < Self::ENCODED_LEN {
19097            panic!(
19098                "buffer is too small (need {} bytes, but got {})",
19099                Self::ENCODED_LEN,
19100                __tmp.remaining(),
19101            )
19102        }
19103        __tmp.put_i32_le(self.interval_us);
19104        __tmp.put_u16_le(self.message_id);
19105        if matches!(version, MavlinkVersion::V2) {
19106            let len = __tmp.len();
19107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19108        } else {
19109            __tmp.len()
19110        }
19111    }
19112}
19113#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19114#[doc = ""]
19115#[doc = "ID: 47"]
19116#[derive(Debug, Clone, PartialEq)]
19117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19119#[cfg_attr(feature = "ts", derive(TS))]
19120#[cfg_attr(feature = "ts", ts(export))]
19121pub struct MISSION_ACK_DATA {
19122    #[doc = "System ID"]
19123    pub target_system: u8,
19124    #[doc = "Component ID"]
19125    pub target_component: u8,
19126    #[doc = "Mission result."]
19127    pub mavtype: MavMissionResult,
19128    #[doc = "Mission type."]
19129    #[cfg_attr(feature = "serde", serde(default))]
19130    pub mission_type: MavMissionType,
19131    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19132    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19133    pub opaque_id: u32,
19134}
19135impl MISSION_ACK_DATA {
19136    pub const ENCODED_LEN: usize = 8usize;
19137    pub const DEFAULT: Self = Self {
19138        target_system: 0_u8,
19139        target_component: 0_u8,
19140        mavtype: MavMissionResult::DEFAULT,
19141        mission_type: MavMissionType::DEFAULT,
19142        opaque_id: 0_u32,
19143    };
19144    #[cfg(feature = "arbitrary")]
19145    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19146        use arbitrary::{Arbitrary, Unstructured};
19147        let mut buf = [0u8; 1024];
19148        rng.fill_bytes(&mut buf);
19149        let mut unstructured = Unstructured::new(&buf);
19150        Self::arbitrary(&mut unstructured).unwrap_or_default()
19151    }
19152}
19153impl Default for MISSION_ACK_DATA {
19154    fn default() -> Self {
19155        Self::DEFAULT.clone()
19156    }
19157}
19158impl MessageData for MISSION_ACK_DATA {
19159    type Message = MavMessage;
19160    const ID: u32 = 47u32;
19161    const NAME: &'static str = "MISSION_ACK";
19162    const EXTRA_CRC: u8 = 153u8;
19163    const ENCODED_LEN: usize = 8usize;
19164    fn deser(
19165        _version: MavlinkVersion,
19166        __input: &[u8],
19167    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19168        let avail_len = __input.len();
19169        let mut payload_buf = [0; Self::ENCODED_LEN];
19170        let mut buf = if avail_len < Self::ENCODED_LEN {
19171            payload_buf[0..avail_len].copy_from_slice(__input);
19172            Bytes::new(&payload_buf)
19173        } else {
19174            Bytes::new(__input)
19175        };
19176        let mut __struct = Self::default();
19177        __struct.target_system = buf.get_u8()?;
19178        __struct.target_component = buf.get_u8()?;
19179        let tmp = buf.get_u8()?;
19180        __struct.mavtype =
19181            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19182                enum_type: "MavMissionResult",
19183                value: tmp as u64,
19184            })?;
19185        let tmp = buf.get_u8()?;
19186        __struct.mission_type =
19187            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19188                enum_type: "MavMissionType",
19189                value: tmp as u64,
19190            })?;
19191        __struct.opaque_id = buf.get_u32_le()?;
19192        Ok(__struct)
19193    }
19194    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19195        let mut __tmp = BytesMut::new(bytes);
19196        #[allow(clippy::absurd_extreme_comparisons)]
19197        #[allow(unused_comparisons)]
19198        if __tmp.remaining() < Self::ENCODED_LEN {
19199            panic!(
19200                "buffer is too small (need {} bytes, but got {})",
19201                Self::ENCODED_LEN,
19202                __tmp.remaining(),
19203            )
19204        }
19205        __tmp.put_u8(self.target_system);
19206        __tmp.put_u8(self.target_component);
19207        __tmp.put_u8(self.mavtype as u8);
19208        if matches!(version, MavlinkVersion::V2) {
19209            __tmp.put_u8(self.mission_type as u8);
19210            __tmp.put_u32_le(self.opaque_id);
19211            let len = __tmp.len();
19212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19213        } else {
19214            __tmp.len()
19215        }
19216    }
19217}
19218#[doc = "Delete all mission items at once."]
19219#[doc = ""]
19220#[doc = "ID: 45"]
19221#[derive(Debug, Clone, PartialEq)]
19222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19224#[cfg_attr(feature = "ts", derive(TS))]
19225#[cfg_attr(feature = "ts", ts(export))]
19226pub struct MISSION_CLEAR_ALL_DATA {
19227    #[doc = "System ID"]
19228    pub target_system: u8,
19229    #[doc = "Component ID"]
19230    pub target_component: u8,
19231    #[doc = "Mission type."]
19232    #[cfg_attr(feature = "serde", serde(default))]
19233    pub mission_type: MavMissionType,
19234}
19235impl MISSION_CLEAR_ALL_DATA {
19236    pub const ENCODED_LEN: usize = 3usize;
19237    pub const DEFAULT: Self = Self {
19238        target_system: 0_u8,
19239        target_component: 0_u8,
19240        mission_type: MavMissionType::DEFAULT,
19241    };
19242    #[cfg(feature = "arbitrary")]
19243    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19244        use arbitrary::{Arbitrary, Unstructured};
19245        let mut buf = [0u8; 1024];
19246        rng.fill_bytes(&mut buf);
19247        let mut unstructured = Unstructured::new(&buf);
19248        Self::arbitrary(&mut unstructured).unwrap_or_default()
19249    }
19250}
19251impl Default for MISSION_CLEAR_ALL_DATA {
19252    fn default() -> Self {
19253        Self::DEFAULT.clone()
19254    }
19255}
19256impl MessageData for MISSION_CLEAR_ALL_DATA {
19257    type Message = MavMessage;
19258    const ID: u32 = 45u32;
19259    const NAME: &'static str = "MISSION_CLEAR_ALL";
19260    const EXTRA_CRC: u8 = 232u8;
19261    const ENCODED_LEN: usize = 3usize;
19262    fn deser(
19263        _version: MavlinkVersion,
19264        __input: &[u8],
19265    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19266        let avail_len = __input.len();
19267        let mut payload_buf = [0; Self::ENCODED_LEN];
19268        let mut buf = if avail_len < Self::ENCODED_LEN {
19269            payload_buf[0..avail_len].copy_from_slice(__input);
19270            Bytes::new(&payload_buf)
19271        } else {
19272            Bytes::new(__input)
19273        };
19274        let mut __struct = Self::default();
19275        __struct.target_system = buf.get_u8()?;
19276        __struct.target_component = buf.get_u8()?;
19277        let tmp = buf.get_u8()?;
19278        __struct.mission_type =
19279            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19280                enum_type: "MavMissionType",
19281                value: tmp as u64,
19282            })?;
19283        Ok(__struct)
19284    }
19285    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19286        let mut __tmp = BytesMut::new(bytes);
19287        #[allow(clippy::absurd_extreme_comparisons)]
19288        #[allow(unused_comparisons)]
19289        if __tmp.remaining() < Self::ENCODED_LEN {
19290            panic!(
19291                "buffer is too small (need {} bytes, but got {})",
19292                Self::ENCODED_LEN,
19293                __tmp.remaining(),
19294            )
19295        }
19296        __tmp.put_u8(self.target_system);
19297        __tmp.put_u8(self.target_component);
19298        if matches!(version, MavlinkVersion::V2) {
19299            __tmp.put_u8(self.mission_type as u8);
19300            let len = __tmp.len();
19301            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19302        } else {
19303            __tmp.len()
19304        }
19305    }
19306}
19307#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19308#[doc = ""]
19309#[doc = "ID: 44"]
19310#[derive(Debug, Clone, PartialEq)]
19311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19313#[cfg_attr(feature = "ts", derive(TS))]
19314#[cfg_attr(feature = "ts", ts(export))]
19315pub struct MISSION_COUNT_DATA {
19316    #[doc = "Number of mission items in the sequence"]
19317    pub count: u16,
19318    #[doc = "System ID"]
19319    pub target_system: u8,
19320    #[doc = "Component ID"]
19321    pub target_component: u8,
19322    #[doc = "Mission type."]
19323    #[cfg_attr(feature = "serde", serde(default))]
19324    pub mission_type: MavMissionType,
19325    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19326    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19327    pub opaque_id: u32,
19328}
19329impl MISSION_COUNT_DATA {
19330    pub const ENCODED_LEN: usize = 9usize;
19331    pub const DEFAULT: Self = Self {
19332        count: 0_u16,
19333        target_system: 0_u8,
19334        target_component: 0_u8,
19335        mission_type: MavMissionType::DEFAULT,
19336        opaque_id: 0_u32,
19337    };
19338    #[cfg(feature = "arbitrary")]
19339    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19340        use arbitrary::{Arbitrary, Unstructured};
19341        let mut buf = [0u8; 1024];
19342        rng.fill_bytes(&mut buf);
19343        let mut unstructured = Unstructured::new(&buf);
19344        Self::arbitrary(&mut unstructured).unwrap_or_default()
19345    }
19346}
19347impl Default for MISSION_COUNT_DATA {
19348    fn default() -> Self {
19349        Self::DEFAULT.clone()
19350    }
19351}
19352impl MessageData for MISSION_COUNT_DATA {
19353    type Message = MavMessage;
19354    const ID: u32 = 44u32;
19355    const NAME: &'static str = "MISSION_COUNT";
19356    const EXTRA_CRC: u8 = 221u8;
19357    const ENCODED_LEN: usize = 9usize;
19358    fn deser(
19359        _version: MavlinkVersion,
19360        __input: &[u8],
19361    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19362        let avail_len = __input.len();
19363        let mut payload_buf = [0; Self::ENCODED_LEN];
19364        let mut buf = if avail_len < Self::ENCODED_LEN {
19365            payload_buf[0..avail_len].copy_from_slice(__input);
19366            Bytes::new(&payload_buf)
19367        } else {
19368            Bytes::new(__input)
19369        };
19370        let mut __struct = Self::default();
19371        __struct.count = buf.get_u16_le()?;
19372        __struct.target_system = buf.get_u8()?;
19373        __struct.target_component = buf.get_u8()?;
19374        let tmp = buf.get_u8()?;
19375        __struct.mission_type =
19376            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19377                enum_type: "MavMissionType",
19378                value: tmp as u64,
19379            })?;
19380        __struct.opaque_id = buf.get_u32_le()?;
19381        Ok(__struct)
19382    }
19383    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19384        let mut __tmp = BytesMut::new(bytes);
19385        #[allow(clippy::absurd_extreme_comparisons)]
19386        #[allow(unused_comparisons)]
19387        if __tmp.remaining() < Self::ENCODED_LEN {
19388            panic!(
19389                "buffer is too small (need {} bytes, but got {})",
19390                Self::ENCODED_LEN,
19391                __tmp.remaining(),
19392            )
19393        }
19394        __tmp.put_u16_le(self.count);
19395        __tmp.put_u8(self.target_system);
19396        __tmp.put_u8(self.target_component);
19397        if matches!(version, MavlinkVersion::V2) {
19398            __tmp.put_u8(self.mission_type as u8);
19399            __tmp.put_u32_le(self.opaque_id);
19400            let len = __tmp.len();
19401            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19402        } else {
19403            __tmp.len()
19404        }
19405    }
19406}
19407#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19408#[doc = ""]
19409#[doc = "ID: 42"]
19410#[derive(Debug, Clone, PartialEq)]
19411#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19412#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19413#[cfg_attr(feature = "ts", derive(TS))]
19414#[cfg_attr(feature = "ts", ts(export))]
19415pub struct MISSION_CURRENT_DATA {
19416    #[doc = "Sequence"]
19417    pub seq: u16,
19418    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19419    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19420    pub total: u16,
19421    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19422    #[cfg_attr(feature = "serde", serde(default))]
19423    pub mission_state: MissionState,
19424    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19425    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19426    pub mission_mode: u8,
19427    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19428    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19429    pub mission_id: u32,
19430    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19431    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19432    pub fence_id: u32,
19433    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19434    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19435    pub rally_points_id: u32,
19436}
19437impl MISSION_CURRENT_DATA {
19438    pub const ENCODED_LEN: usize = 18usize;
19439    pub const DEFAULT: Self = Self {
19440        seq: 0_u16,
19441        total: 0_u16,
19442        mission_state: MissionState::DEFAULT,
19443        mission_mode: 0_u8,
19444        mission_id: 0_u32,
19445        fence_id: 0_u32,
19446        rally_points_id: 0_u32,
19447    };
19448    #[cfg(feature = "arbitrary")]
19449    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19450        use arbitrary::{Arbitrary, Unstructured};
19451        let mut buf = [0u8; 1024];
19452        rng.fill_bytes(&mut buf);
19453        let mut unstructured = Unstructured::new(&buf);
19454        Self::arbitrary(&mut unstructured).unwrap_or_default()
19455    }
19456}
19457impl Default for MISSION_CURRENT_DATA {
19458    fn default() -> Self {
19459        Self::DEFAULT.clone()
19460    }
19461}
19462impl MessageData for MISSION_CURRENT_DATA {
19463    type Message = MavMessage;
19464    const ID: u32 = 42u32;
19465    const NAME: &'static str = "MISSION_CURRENT";
19466    const EXTRA_CRC: u8 = 28u8;
19467    const ENCODED_LEN: usize = 18usize;
19468    fn deser(
19469        _version: MavlinkVersion,
19470        __input: &[u8],
19471    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19472        let avail_len = __input.len();
19473        let mut payload_buf = [0; Self::ENCODED_LEN];
19474        let mut buf = if avail_len < Self::ENCODED_LEN {
19475            payload_buf[0..avail_len].copy_from_slice(__input);
19476            Bytes::new(&payload_buf)
19477        } else {
19478            Bytes::new(__input)
19479        };
19480        let mut __struct = Self::default();
19481        __struct.seq = buf.get_u16_le()?;
19482        __struct.total = buf.get_u16_le()?;
19483        let tmp = buf.get_u8()?;
19484        __struct.mission_state =
19485            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19486                enum_type: "MissionState",
19487                value: tmp as u64,
19488            })?;
19489        __struct.mission_mode = buf.get_u8()?;
19490        __struct.mission_id = buf.get_u32_le()?;
19491        __struct.fence_id = buf.get_u32_le()?;
19492        __struct.rally_points_id = buf.get_u32_le()?;
19493        Ok(__struct)
19494    }
19495    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19496        let mut __tmp = BytesMut::new(bytes);
19497        #[allow(clippy::absurd_extreme_comparisons)]
19498        #[allow(unused_comparisons)]
19499        if __tmp.remaining() < Self::ENCODED_LEN {
19500            panic!(
19501                "buffer is too small (need {} bytes, but got {})",
19502                Self::ENCODED_LEN,
19503                __tmp.remaining(),
19504            )
19505        }
19506        __tmp.put_u16_le(self.seq);
19507        if matches!(version, MavlinkVersion::V2) {
19508            __tmp.put_u16_le(self.total);
19509            __tmp.put_u8(self.mission_state as u8);
19510            __tmp.put_u8(self.mission_mode);
19511            __tmp.put_u32_le(self.mission_id);
19512            __tmp.put_u32_le(self.fence_id);
19513            __tmp.put_u32_le(self.rally_points_id);
19514            let len = __tmp.len();
19515            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19516        } else {
19517            __tmp.len()
19518        }
19519    }
19520}
19521#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19522#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19523#[doc = ""]
19524#[doc = "ID: 39"]
19525#[derive(Debug, Clone, PartialEq)]
19526#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19527#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19528#[cfg_attr(feature = "ts", derive(TS))]
19529#[cfg_attr(feature = "ts", ts(export))]
19530pub struct MISSION_ITEM_DATA {
19531    #[doc = "PARAM1, see MAV_CMD enum"]
19532    pub param1: f32,
19533    #[doc = "PARAM2, see MAV_CMD enum"]
19534    pub param2: f32,
19535    #[doc = "PARAM3, see MAV_CMD enum"]
19536    pub param3: f32,
19537    #[doc = "PARAM4, see MAV_CMD enum"]
19538    pub param4: f32,
19539    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19540    pub x: f32,
19541    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19542    pub y: f32,
19543    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19544    pub z: f32,
19545    #[doc = "Sequence"]
19546    pub seq: u16,
19547    #[doc = "The scheduled action for the waypoint."]
19548    pub command: MavCmd,
19549    #[doc = "System ID"]
19550    pub target_system: u8,
19551    #[doc = "Component ID"]
19552    pub target_component: u8,
19553    #[doc = "The coordinate system of the waypoint."]
19554    pub frame: MavFrame,
19555    #[doc = "false:0, true:1"]
19556    pub current: u8,
19557    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19558    pub autocontinue: u8,
19559    #[doc = "Mission type."]
19560    #[cfg_attr(feature = "serde", serde(default))]
19561    pub mission_type: MavMissionType,
19562}
19563impl MISSION_ITEM_DATA {
19564    pub const ENCODED_LEN: usize = 38usize;
19565    pub const DEFAULT: Self = Self {
19566        param1: 0.0_f32,
19567        param2: 0.0_f32,
19568        param3: 0.0_f32,
19569        param4: 0.0_f32,
19570        x: 0.0_f32,
19571        y: 0.0_f32,
19572        z: 0.0_f32,
19573        seq: 0_u16,
19574        command: MavCmd::DEFAULT,
19575        target_system: 0_u8,
19576        target_component: 0_u8,
19577        frame: MavFrame::DEFAULT,
19578        current: 0_u8,
19579        autocontinue: 0_u8,
19580        mission_type: MavMissionType::DEFAULT,
19581    };
19582    #[cfg(feature = "arbitrary")]
19583    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19584        use arbitrary::{Arbitrary, Unstructured};
19585        let mut buf = [0u8; 1024];
19586        rng.fill_bytes(&mut buf);
19587        let mut unstructured = Unstructured::new(&buf);
19588        Self::arbitrary(&mut unstructured).unwrap_or_default()
19589    }
19590}
19591impl Default for MISSION_ITEM_DATA {
19592    fn default() -> Self {
19593        Self::DEFAULT.clone()
19594    }
19595}
19596impl MessageData for MISSION_ITEM_DATA {
19597    type Message = MavMessage;
19598    const ID: u32 = 39u32;
19599    const NAME: &'static str = "MISSION_ITEM";
19600    const EXTRA_CRC: u8 = 254u8;
19601    const ENCODED_LEN: usize = 38usize;
19602    fn deser(
19603        _version: MavlinkVersion,
19604        __input: &[u8],
19605    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19606        let avail_len = __input.len();
19607        let mut payload_buf = [0; Self::ENCODED_LEN];
19608        let mut buf = if avail_len < Self::ENCODED_LEN {
19609            payload_buf[0..avail_len].copy_from_slice(__input);
19610            Bytes::new(&payload_buf)
19611        } else {
19612            Bytes::new(__input)
19613        };
19614        let mut __struct = Self::default();
19615        __struct.param1 = buf.get_f32_le()?;
19616        __struct.param2 = buf.get_f32_le()?;
19617        __struct.param3 = buf.get_f32_le()?;
19618        __struct.param4 = buf.get_f32_le()?;
19619        __struct.x = buf.get_f32_le()?;
19620        __struct.y = buf.get_f32_le()?;
19621        __struct.z = buf.get_f32_le()?;
19622        __struct.seq = buf.get_u16_le()?;
19623        let tmp = buf.get_u16_le()?;
19624        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19625            ::mavlink_core::error::ParserError::InvalidEnum {
19626                enum_type: "MavCmd",
19627                value: tmp as u64,
19628            },
19629        )?;
19630        __struct.target_system = buf.get_u8()?;
19631        __struct.target_component = buf.get_u8()?;
19632        let tmp = buf.get_u8()?;
19633        __struct.frame =
19634            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19635                enum_type: "MavFrame",
19636                value: tmp as u64,
19637            })?;
19638        __struct.current = buf.get_u8()?;
19639        __struct.autocontinue = buf.get_u8()?;
19640        let tmp = buf.get_u8()?;
19641        __struct.mission_type =
19642            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19643                enum_type: "MavMissionType",
19644                value: tmp as u64,
19645            })?;
19646        Ok(__struct)
19647    }
19648    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19649        let mut __tmp = BytesMut::new(bytes);
19650        #[allow(clippy::absurd_extreme_comparisons)]
19651        #[allow(unused_comparisons)]
19652        if __tmp.remaining() < Self::ENCODED_LEN {
19653            panic!(
19654                "buffer is too small (need {} bytes, but got {})",
19655                Self::ENCODED_LEN,
19656                __tmp.remaining(),
19657            )
19658        }
19659        __tmp.put_f32_le(self.param1);
19660        __tmp.put_f32_le(self.param2);
19661        __tmp.put_f32_le(self.param3);
19662        __tmp.put_f32_le(self.param4);
19663        __tmp.put_f32_le(self.x);
19664        __tmp.put_f32_le(self.y);
19665        __tmp.put_f32_le(self.z);
19666        __tmp.put_u16_le(self.seq);
19667        __tmp.put_u16_le(self.command as u16);
19668        __tmp.put_u8(self.target_system);
19669        __tmp.put_u8(self.target_component);
19670        __tmp.put_u8(self.frame as u8);
19671        __tmp.put_u8(self.current);
19672        __tmp.put_u8(self.autocontinue);
19673        if matches!(version, MavlinkVersion::V2) {
19674            __tmp.put_u8(self.mission_type as u8);
19675            let len = __tmp.len();
19676            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19677        } else {
19678            __tmp.len()
19679        }
19680    }
19681}
19682#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19683#[doc = ""]
19684#[doc = "ID: 73"]
19685#[derive(Debug, Clone, PartialEq)]
19686#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19687#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19688#[cfg_attr(feature = "ts", derive(TS))]
19689#[cfg_attr(feature = "ts", ts(export))]
19690pub struct MISSION_ITEM_INT_DATA {
19691    #[doc = "PARAM1, see MAV_CMD enum"]
19692    pub param1: f32,
19693    #[doc = "PARAM2, see MAV_CMD enum"]
19694    pub param2: f32,
19695    #[doc = "PARAM3, see MAV_CMD enum"]
19696    pub param3: f32,
19697    #[doc = "PARAM4, see MAV_CMD enum"]
19698    pub param4: f32,
19699    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19700    pub x: i32,
19701    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19702    pub y: i32,
19703    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19704    pub z: f32,
19705    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19706    pub seq: u16,
19707    #[doc = "The scheduled action for the waypoint."]
19708    pub command: MavCmd,
19709    #[doc = "System ID"]
19710    pub target_system: u8,
19711    #[doc = "Component ID"]
19712    pub target_component: u8,
19713    #[doc = "The coordinate system of the waypoint."]
19714    pub frame: MavFrame,
19715    #[doc = "false:0, true:1"]
19716    pub current: u8,
19717    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19718    pub autocontinue: u8,
19719    #[doc = "Mission type."]
19720    #[cfg_attr(feature = "serde", serde(default))]
19721    pub mission_type: MavMissionType,
19722}
19723impl MISSION_ITEM_INT_DATA {
19724    pub const ENCODED_LEN: usize = 38usize;
19725    pub const DEFAULT: Self = Self {
19726        param1: 0.0_f32,
19727        param2: 0.0_f32,
19728        param3: 0.0_f32,
19729        param4: 0.0_f32,
19730        x: 0_i32,
19731        y: 0_i32,
19732        z: 0.0_f32,
19733        seq: 0_u16,
19734        command: MavCmd::DEFAULT,
19735        target_system: 0_u8,
19736        target_component: 0_u8,
19737        frame: MavFrame::DEFAULT,
19738        current: 0_u8,
19739        autocontinue: 0_u8,
19740        mission_type: MavMissionType::DEFAULT,
19741    };
19742    #[cfg(feature = "arbitrary")]
19743    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19744        use arbitrary::{Arbitrary, Unstructured};
19745        let mut buf = [0u8; 1024];
19746        rng.fill_bytes(&mut buf);
19747        let mut unstructured = Unstructured::new(&buf);
19748        Self::arbitrary(&mut unstructured).unwrap_or_default()
19749    }
19750}
19751impl Default for MISSION_ITEM_INT_DATA {
19752    fn default() -> Self {
19753        Self::DEFAULT.clone()
19754    }
19755}
19756impl MessageData for MISSION_ITEM_INT_DATA {
19757    type Message = MavMessage;
19758    const ID: u32 = 73u32;
19759    const NAME: &'static str = "MISSION_ITEM_INT";
19760    const EXTRA_CRC: u8 = 38u8;
19761    const ENCODED_LEN: usize = 38usize;
19762    fn deser(
19763        _version: MavlinkVersion,
19764        __input: &[u8],
19765    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19766        let avail_len = __input.len();
19767        let mut payload_buf = [0; Self::ENCODED_LEN];
19768        let mut buf = if avail_len < Self::ENCODED_LEN {
19769            payload_buf[0..avail_len].copy_from_slice(__input);
19770            Bytes::new(&payload_buf)
19771        } else {
19772            Bytes::new(__input)
19773        };
19774        let mut __struct = Self::default();
19775        __struct.param1 = buf.get_f32_le()?;
19776        __struct.param2 = buf.get_f32_le()?;
19777        __struct.param3 = buf.get_f32_le()?;
19778        __struct.param4 = buf.get_f32_le()?;
19779        __struct.x = buf.get_i32_le()?;
19780        __struct.y = buf.get_i32_le()?;
19781        __struct.z = buf.get_f32_le()?;
19782        __struct.seq = buf.get_u16_le()?;
19783        let tmp = buf.get_u16_le()?;
19784        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19785            ::mavlink_core::error::ParserError::InvalidEnum {
19786                enum_type: "MavCmd",
19787                value: tmp as u64,
19788            },
19789        )?;
19790        __struct.target_system = buf.get_u8()?;
19791        __struct.target_component = buf.get_u8()?;
19792        let tmp = buf.get_u8()?;
19793        __struct.frame =
19794            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19795                enum_type: "MavFrame",
19796                value: tmp as u64,
19797            })?;
19798        __struct.current = buf.get_u8()?;
19799        __struct.autocontinue = buf.get_u8()?;
19800        let tmp = buf.get_u8()?;
19801        __struct.mission_type =
19802            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19803                enum_type: "MavMissionType",
19804                value: tmp as u64,
19805            })?;
19806        Ok(__struct)
19807    }
19808    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19809        let mut __tmp = BytesMut::new(bytes);
19810        #[allow(clippy::absurd_extreme_comparisons)]
19811        #[allow(unused_comparisons)]
19812        if __tmp.remaining() < Self::ENCODED_LEN {
19813            panic!(
19814                "buffer is too small (need {} bytes, but got {})",
19815                Self::ENCODED_LEN,
19816                __tmp.remaining(),
19817            )
19818        }
19819        __tmp.put_f32_le(self.param1);
19820        __tmp.put_f32_le(self.param2);
19821        __tmp.put_f32_le(self.param3);
19822        __tmp.put_f32_le(self.param4);
19823        __tmp.put_i32_le(self.x);
19824        __tmp.put_i32_le(self.y);
19825        __tmp.put_f32_le(self.z);
19826        __tmp.put_u16_le(self.seq);
19827        __tmp.put_u16_le(self.command as u16);
19828        __tmp.put_u8(self.target_system);
19829        __tmp.put_u8(self.target_component);
19830        __tmp.put_u8(self.frame as u8);
19831        __tmp.put_u8(self.current);
19832        __tmp.put_u8(self.autocontinue);
19833        if matches!(version, MavlinkVersion::V2) {
19834            __tmp.put_u8(self.mission_type as u8);
19835            let len = __tmp.len();
19836            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19837        } else {
19838            __tmp.len()
19839        }
19840    }
19841}
19842#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
19843#[doc = ""]
19844#[doc = "ID: 46"]
19845#[derive(Debug, Clone, PartialEq)]
19846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19847#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19848#[cfg_attr(feature = "ts", derive(TS))]
19849#[cfg_attr(feature = "ts", ts(export))]
19850pub struct MISSION_ITEM_REACHED_DATA {
19851    #[doc = "Sequence"]
19852    pub seq: u16,
19853}
19854impl MISSION_ITEM_REACHED_DATA {
19855    pub const ENCODED_LEN: usize = 2usize;
19856    pub const DEFAULT: Self = Self { seq: 0_u16 };
19857    #[cfg(feature = "arbitrary")]
19858    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19859        use arbitrary::{Arbitrary, Unstructured};
19860        let mut buf = [0u8; 1024];
19861        rng.fill_bytes(&mut buf);
19862        let mut unstructured = Unstructured::new(&buf);
19863        Self::arbitrary(&mut unstructured).unwrap_or_default()
19864    }
19865}
19866impl Default for MISSION_ITEM_REACHED_DATA {
19867    fn default() -> Self {
19868        Self::DEFAULT.clone()
19869    }
19870}
19871impl MessageData for MISSION_ITEM_REACHED_DATA {
19872    type Message = MavMessage;
19873    const ID: u32 = 46u32;
19874    const NAME: &'static str = "MISSION_ITEM_REACHED";
19875    const EXTRA_CRC: u8 = 11u8;
19876    const ENCODED_LEN: usize = 2usize;
19877    fn deser(
19878        _version: MavlinkVersion,
19879        __input: &[u8],
19880    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19881        let avail_len = __input.len();
19882        let mut payload_buf = [0; Self::ENCODED_LEN];
19883        let mut buf = if avail_len < Self::ENCODED_LEN {
19884            payload_buf[0..avail_len].copy_from_slice(__input);
19885            Bytes::new(&payload_buf)
19886        } else {
19887            Bytes::new(__input)
19888        };
19889        let mut __struct = Self::default();
19890        __struct.seq = buf.get_u16_le()?;
19891        Ok(__struct)
19892    }
19893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19894        let mut __tmp = BytesMut::new(bytes);
19895        #[allow(clippy::absurd_extreme_comparisons)]
19896        #[allow(unused_comparisons)]
19897        if __tmp.remaining() < Self::ENCODED_LEN {
19898            panic!(
19899                "buffer is too small (need {} bytes, but got {})",
19900                Self::ENCODED_LEN,
19901                __tmp.remaining(),
19902            )
19903        }
19904        __tmp.put_u16_le(self.seq);
19905        if matches!(version, MavlinkVersion::V2) {
19906            let len = __tmp.len();
19907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19908        } else {
19909            __tmp.len()
19910        }
19911    }
19912}
19913#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
19914#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
19915#[doc = ""]
19916#[doc = "ID: 40"]
19917#[derive(Debug, Clone, PartialEq)]
19918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19920#[cfg_attr(feature = "ts", derive(TS))]
19921#[cfg_attr(feature = "ts", ts(export))]
19922pub struct MISSION_REQUEST_DATA {
19923    #[doc = "Sequence"]
19924    pub seq: u16,
19925    #[doc = "System ID"]
19926    pub target_system: u8,
19927    #[doc = "Component ID"]
19928    pub target_component: u8,
19929    #[doc = "Mission type."]
19930    #[cfg_attr(feature = "serde", serde(default))]
19931    pub mission_type: MavMissionType,
19932}
19933impl MISSION_REQUEST_DATA {
19934    pub const ENCODED_LEN: usize = 5usize;
19935    pub const DEFAULT: Self = Self {
19936        seq: 0_u16,
19937        target_system: 0_u8,
19938        target_component: 0_u8,
19939        mission_type: MavMissionType::DEFAULT,
19940    };
19941    #[cfg(feature = "arbitrary")]
19942    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19943        use arbitrary::{Arbitrary, Unstructured};
19944        let mut buf = [0u8; 1024];
19945        rng.fill_bytes(&mut buf);
19946        let mut unstructured = Unstructured::new(&buf);
19947        Self::arbitrary(&mut unstructured).unwrap_or_default()
19948    }
19949}
19950impl Default for MISSION_REQUEST_DATA {
19951    fn default() -> Self {
19952        Self::DEFAULT.clone()
19953    }
19954}
19955impl MessageData for MISSION_REQUEST_DATA {
19956    type Message = MavMessage;
19957    const ID: u32 = 40u32;
19958    const NAME: &'static str = "MISSION_REQUEST";
19959    const EXTRA_CRC: u8 = 230u8;
19960    const ENCODED_LEN: usize = 5usize;
19961    fn deser(
19962        _version: MavlinkVersion,
19963        __input: &[u8],
19964    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19965        let avail_len = __input.len();
19966        let mut payload_buf = [0; Self::ENCODED_LEN];
19967        let mut buf = if avail_len < Self::ENCODED_LEN {
19968            payload_buf[0..avail_len].copy_from_slice(__input);
19969            Bytes::new(&payload_buf)
19970        } else {
19971            Bytes::new(__input)
19972        };
19973        let mut __struct = Self::default();
19974        __struct.seq = buf.get_u16_le()?;
19975        __struct.target_system = buf.get_u8()?;
19976        __struct.target_component = buf.get_u8()?;
19977        let tmp = buf.get_u8()?;
19978        __struct.mission_type =
19979            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19980                enum_type: "MavMissionType",
19981                value: tmp as u64,
19982            })?;
19983        Ok(__struct)
19984    }
19985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19986        let mut __tmp = BytesMut::new(bytes);
19987        #[allow(clippy::absurd_extreme_comparisons)]
19988        #[allow(unused_comparisons)]
19989        if __tmp.remaining() < Self::ENCODED_LEN {
19990            panic!(
19991                "buffer is too small (need {} bytes, but got {})",
19992                Self::ENCODED_LEN,
19993                __tmp.remaining(),
19994            )
19995        }
19996        __tmp.put_u16_le(self.seq);
19997        __tmp.put_u8(self.target_system);
19998        __tmp.put_u8(self.target_component);
19999        if matches!(version, MavlinkVersion::V2) {
20000            __tmp.put_u8(self.mission_type as u8);
20001            let len = __tmp.len();
20002            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20003        } else {
20004            __tmp.len()
20005        }
20006    }
20007}
20008#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20009#[doc = ""]
20010#[doc = "ID: 51"]
20011#[derive(Debug, Clone, PartialEq)]
20012#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20014#[cfg_attr(feature = "ts", derive(TS))]
20015#[cfg_attr(feature = "ts", ts(export))]
20016pub struct MISSION_REQUEST_INT_DATA {
20017    #[doc = "Sequence"]
20018    pub seq: u16,
20019    #[doc = "System ID"]
20020    pub target_system: u8,
20021    #[doc = "Component ID"]
20022    pub target_component: u8,
20023    #[doc = "Mission type."]
20024    #[cfg_attr(feature = "serde", serde(default))]
20025    pub mission_type: MavMissionType,
20026}
20027impl MISSION_REQUEST_INT_DATA {
20028    pub const ENCODED_LEN: usize = 5usize;
20029    pub const DEFAULT: Self = Self {
20030        seq: 0_u16,
20031        target_system: 0_u8,
20032        target_component: 0_u8,
20033        mission_type: MavMissionType::DEFAULT,
20034    };
20035    #[cfg(feature = "arbitrary")]
20036    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20037        use arbitrary::{Arbitrary, Unstructured};
20038        let mut buf = [0u8; 1024];
20039        rng.fill_bytes(&mut buf);
20040        let mut unstructured = Unstructured::new(&buf);
20041        Self::arbitrary(&mut unstructured).unwrap_or_default()
20042    }
20043}
20044impl Default for MISSION_REQUEST_INT_DATA {
20045    fn default() -> Self {
20046        Self::DEFAULT.clone()
20047    }
20048}
20049impl MessageData for MISSION_REQUEST_INT_DATA {
20050    type Message = MavMessage;
20051    const ID: u32 = 51u32;
20052    const NAME: &'static str = "MISSION_REQUEST_INT";
20053    const EXTRA_CRC: u8 = 196u8;
20054    const ENCODED_LEN: usize = 5usize;
20055    fn deser(
20056        _version: MavlinkVersion,
20057        __input: &[u8],
20058    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20059        let avail_len = __input.len();
20060        let mut payload_buf = [0; Self::ENCODED_LEN];
20061        let mut buf = if avail_len < Self::ENCODED_LEN {
20062            payload_buf[0..avail_len].copy_from_slice(__input);
20063            Bytes::new(&payload_buf)
20064        } else {
20065            Bytes::new(__input)
20066        };
20067        let mut __struct = Self::default();
20068        __struct.seq = buf.get_u16_le()?;
20069        __struct.target_system = buf.get_u8()?;
20070        __struct.target_component = buf.get_u8()?;
20071        let tmp = buf.get_u8()?;
20072        __struct.mission_type =
20073            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20074                enum_type: "MavMissionType",
20075                value: tmp as u64,
20076            })?;
20077        Ok(__struct)
20078    }
20079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20080        let mut __tmp = BytesMut::new(bytes);
20081        #[allow(clippy::absurd_extreme_comparisons)]
20082        #[allow(unused_comparisons)]
20083        if __tmp.remaining() < Self::ENCODED_LEN {
20084            panic!(
20085                "buffer is too small (need {} bytes, but got {})",
20086                Self::ENCODED_LEN,
20087                __tmp.remaining(),
20088            )
20089        }
20090        __tmp.put_u16_le(self.seq);
20091        __tmp.put_u8(self.target_system);
20092        __tmp.put_u8(self.target_component);
20093        if matches!(version, MavlinkVersion::V2) {
20094            __tmp.put_u8(self.mission_type as u8);
20095            let len = __tmp.len();
20096            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20097        } else {
20098            __tmp.len()
20099        }
20100    }
20101}
20102#[doc = "Request the overall list of mission items from the system/component."]
20103#[doc = ""]
20104#[doc = "ID: 43"]
20105#[derive(Debug, Clone, PartialEq)]
20106#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20107#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20108#[cfg_attr(feature = "ts", derive(TS))]
20109#[cfg_attr(feature = "ts", ts(export))]
20110pub struct MISSION_REQUEST_LIST_DATA {
20111    #[doc = "System ID"]
20112    pub target_system: u8,
20113    #[doc = "Component ID"]
20114    pub target_component: u8,
20115    #[doc = "Mission type."]
20116    #[cfg_attr(feature = "serde", serde(default))]
20117    pub mission_type: MavMissionType,
20118}
20119impl MISSION_REQUEST_LIST_DATA {
20120    pub const ENCODED_LEN: usize = 3usize;
20121    pub const DEFAULT: Self = Self {
20122        target_system: 0_u8,
20123        target_component: 0_u8,
20124        mission_type: MavMissionType::DEFAULT,
20125    };
20126    #[cfg(feature = "arbitrary")]
20127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20128        use arbitrary::{Arbitrary, Unstructured};
20129        let mut buf = [0u8; 1024];
20130        rng.fill_bytes(&mut buf);
20131        let mut unstructured = Unstructured::new(&buf);
20132        Self::arbitrary(&mut unstructured).unwrap_or_default()
20133    }
20134}
20135impl Default for MISSION_REQUEST_LIST_DATA {
20136    fn default() -> Self {
20137        Self::DEFAULT.clone()
20138    }
20139}
20140impl MessageData for MISSION_REQUEST_LIST_DATA {
20141    type Message = MavMessage;
20142    const ID: u32 = 43u32;
20143    const NAME: &'static str = "MISSION_REQUEST_LIST";
20144    const EXTRA_CRC: u8 = 132u8;
20145    const ENCODED_LEN: usize = 3usize;
20146    fn deser(
20147        _version: MavlinkVersion,
20148        __input: &[u8],
20149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20150        let avail_len = __input.len();
20151        let mut payload_buf = [0; Self::ENCODED_LEN];
20152        let mut buf = if avail_len < Self::ENCODED_LEN {
20153            payload_buf[0..avail_len].copy_from_slice(__input);
20154            Bytes::new(&payload_buf)
20155        } else {
20156            Bytes::new(__input)
20157        };
20158        let mut __struct = Self::default();
20159        __struct.target_system = buf.get_u8()?;
20160        __struct.target_component = buf.get_u8()?;
20161        let tmp = buf.get_u8()?;
20162        __struct.mission_type =
20163            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20164                enum_type: "MavMissionType",
20165                value: tmp as u64,
20166            })?;
20167        Ok(__struct)
20168    }
20169    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20170        let mut __tmp = BytesMut::new(bytes);
20171        #[allow(clippy::absurd_extreme_comparisons)]
20172        #[allow(unused_comparisons)]
20173        if __tmp.remaining() < Self::ENCODED_LEN {
20174            panic!(
20175                "buffer is too small (need {} bytes, but got {})",
20176                Self::ENCODED_LEN,
20177                __tmp.remaining(),
20178            )
20179        }
20180        __tmp.put_u8(self.target_system);
20181        __tmp.put_u8(self.target_component);
20182        if matches!(version, MavlinkVersion::V2) {
20183            __tmp.put_u8(self.mission_type as u8);
20184            let len = __tmp.len();
20185            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20186        } else {
20187            __tmp.len()
20188        }
20189    }
20190}
20191#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20192#[doc = ""]
20193#[doc = "ID: 37"]
20194#[derive(Debug, Clone, PartialEq)]
20195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20196#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20197#[cfg_attr(feature = "ts", derive(TS))]
20198#[cfg_attr(feature = "ts", ts(export))]
20199pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20200    #[doc = "Start index"]
20201    pub start_index: i16,
20202    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20203    pub end_index: i16,
20204    #[doc = "System ID"]
20205    pub target_system: u8,
20206    #[doc = "Component ID"]
20207    pub target_component: u8,
20208    #[doc = "Mission type."]
20209    #[cfg_attr(feature = "serde", serde(default))]
20210    pub mission_type: MavMissionType,
20211}
20212impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20213    pub const ENCODED_LEN: usize = 7usize;
20214    pub const DEFAULT: Self = Self {
20215        start_index: 0_i16,
20216        end_index: 0_i16,
20217        target_system: 0_u8,
20218        target_component: 0_u8,
20219        mission_type: MavMissionType::DEFAULT,
20220    };
20221    #[cfg(feature = "arbitrary")]
20222    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20223        use arbitrary::{Arbitrary, Unstructured};
20224        let mut buf = [0u8; 1024];
20225        rng.fill_bytes(&mut buf);
20226        let mut unstructured = Unstructured::new(&buf);
20227        Self::arbitrary(&mut unstructured).unwrap_or_default()
20228    }
20229}
20230impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20231    fn default() -> Self {
20232        Self::DEFAULT.clone()
20233    }
20234}
20235impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20236    type Message = MavMessage;
20237    const ID: u32 = 37u32;
20238    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20239    const EXTRA_CRC: u8 = 212u8;
20240    const ENCODED_LEN: usize = 7usize;
20241    fn deser(
20242        _version: MavlinkVersion,
20243        __input: &[u8],
20244    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20245        let avail_len = __input.len();
20246        let mut payload_buf = [0; Self::ENCODED_LEN];
20247        let mut buf = if avail_len < Self::ENCODED_LEN {
20248            payload_buf[0..avail_len].copy_from_slice(__input);
20249            Bytes::new(&payload_buf)
20250        } else {
20251            Bytes::new(__input)
20252        };
20253        let mut __struct = Self::default();
20254        __struct.start_index = buf.get_i16_le()?;
20255        __struct.end_index = buf.get_i16_le()?;
20256        __struct.target_system = buf.get_u8()?;
20257        __struct.target_component = buf.get_u8()?;
20258        let tmp = buf.get_u8()?;
20259        __struct.mission_type =
20260            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20261                enum_type: "MavMissionType",
20262                value: tmp as u64,
20263            })?;
20264        Ok(__struct)
20265    }
20266    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20267        let mut __tmp = BytesMut::new(bytes);
20268        #[allow(clippy::absurd_extreme_comparisons)]
20269        #[allow(unused_comparisons)]
20270        if __tmp.remaining() < Self::ENCODED_LEN {
20271            panic!(
20272                "buffer is too small (need {} bytes, but got {})",
20273                Self::ENCODED_LEN,
20274                __tmp.remaining(),
20275            )
20276        }
20277        __tmp.put_i16_le(self.start_index);
20278        __tmp.put_i16_le(self.end_index);
20279        __tmp.put_u8(self.target_system);
20280        __tmp.put_u8(self.target_component);
20281        if matches!(version, MavlinkVersion::V2) {
20282            __tmp.put_u8(self.mission_type as u8);
20283            let len = __tmp.len();
20284            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20285        } else {
20286            __tmp.len()
20287        }
20288    }
20289}
20290#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20291#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20292#[doc = ""]
20293#[doc = "ID: 41"]
20294#[derive(Debug, Clone, PartialEq)]
20295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20297#[cfg_attr(feature = "ts", derive(TS))]
20298#[cfg_attr(feature = "ts", ts(export))]
20299pub struct MISSION_SET_CURRENT_DATA {
20300    #[doc = "Sequence"]
20301    pub seq: u16,
20302    #[doc = "System ID"]
20303    pub target_system: u8,
20304    #[doc = "Component ID"]
20305    pub target_component: u8,
20306}
20307impl MISSION_SET_CURRENT_DATA {
20308    pub const ENCODED_LEN: usize = 4usize;
20309    pub const DEFAULT: Self = Self {
20310        seq: 0_u16,
20311        target_system: 0_u8,
20312        target_component: 0_u8,
20313    };
20314    #[cfg(feature = "arbitrary")]
20315    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20316        use arbitrary::{Arbitrary, Unstructured};
20317        let mut buf = [0u8; 1024];
20318        rng.fill_bytes(&mut buf);
20319        let mut unstructured = Unstructured::new(&buf);
20320        Self::arbitrary(&mut unstructured).unwrap_or_default()
20321    }
20322}
20323impl Default for MISSION_SET_CURRENT_DATA {
20324    fn default() -> Self {
20325        Self::DEFAULT.clone()
20326    }
20327}
20328impl MessageData for MISSION_SET_CURRENT_DATA {
20329    type Message = MavMessage;
20330    const ID: u32 = 41u32;
20331    const NAME: &'static str = "MISSION_SET_CURRENT";
20332    const EXTRA_CRC: u8 = 28u8;
20333    const ENCODED_LEN: usize = 4usize;
20334    fn deser(
20335        _version: MavlinkVersion,
20336        __input: &[u8],
20337    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20338        let avail_len = __input.len();
20339        let mut payload_buf = [0; Self::ENCODED_LEN];
20340        let mut buf = if avail_len < Self::ENCODED_LEN {
20341            payload_buf[0..avail_len].copy_from_slice(__input);
20342            Bytes::new(&payload_buf)
20343        } else {
20344            Bytes::new(__input)
20345        };
20346        let mut __struct = Self::default();
20347        __struct.seq = buf.get_u16_le()?;
20348        __struct.target_system = buf.get_u8()?;
20349        __struct.target_component = buf.get_u8()?;
20350        Ok(__struct)
20351    }
20352    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20353        let mut __tmp = BytesMut::new(bytes);
20354        #[allow(clippy::absurd_extreme_comparisons)]
20355        #[allow(unused_comparisons)]
20356        if __tmp.remaining() < Self::ENCODED_LEN {
20357            panic!(
20358                "buffer is too small (need {} bytes, but got {})",
20359                Self::ENCODED_LEN,
20360                __tmp.remaining(),
20361            )
20362        }
20363        __tmp.put_u16_le(self.seq);
20364        __tmp.put_u8(self.target_system);
20365        __tmp.put_u8(self.target_component);
20366        if matches!(version, MavlinkVersion::V2) {
20367            let len = __tmp.len();
20368            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20369        } else {
20370            __tmp.len()
20371        }
20372    }
20373}
20374#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20375#[doc = ""]
20376#[doc = "ID: 38"]
20377#[derive(Debug, Clone, PartialEq)]
20378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20380#[cfg_attr(feature = "ts", derive(TS))]
20381#[cfg_attr(feature = "ts", ts(export))]
20382pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20383    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20384    pub start_index: i16,
20385    #[doc = "End index, equal or greater than start index."]
20386    pub end_index: i16,
20387    #[doc = "System ID"]
20388    pub target_system: u8,
20389    #[doc = "Component ID"]
20390    pub target_component: u8,
20391    #[doc = "Mission type."]
20392    #[cfg_attr(feature = "serde", serde(default))]
20393    pub mission_type: MavMissionType,
20394}
20395impl MISSION_WRITE_PARTIAL_LIST_DATA {
20396    pub const ENCODED_LEN: usize = 7usize;
20397    pub const DEFAULT: Self = Self {
20398        start_index: 0_i16,
20399        end_index: 0_i16,
20400        target_system: 0_u8,
20401        target_component: 0_u8,
20402        mission_type: MavMissionType::DEFAULT,
20403    };
20404    #[cfg(feature = "arbitrary")]
20405    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20406        use arbitrary::{Arbitrary, Unstructured};
20407        let mut buf = [0u8; 1024];
20408        rng.fill_bytes(&mut buf);
20409        let mut unstructured = Unstructured::new(&buf);
20410        Self::arbitrary(&mut unstructured).unwrap_or_default()
20411    }
20412}
20413impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20414    fn default() -> Self {
20415        Self::DEFAULT.clone()
20416    }
20417}
20418impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20419    type Message = MavMessage;
20420    const ID: u32 = 38u32;
20421    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20422    const EXTRA_CRC: u8 = 9u8;
20423    const ENCODED_LEN: usize = 7usize;
20424    fn deser(
20425        _version: MavlinkVersion,
20426        __input: &[u8],
20427    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20428        let avail_len = __input.len();
20429        let mut payload_buf = [0; Self::ENCODED_LEN];
20430        let mut buf = if avail_len < Self::ENCODED_LEN {
20431            payload_buf[0..avail_len].copy_from_slice(__input);
20432            Bytes::new(&payload_buf)
20433        } else {
20434            Bytes::new(__input)
20435        };
20436        let mut __struct = Self::default();
20437        __struct.start_index = buf.get_i16_le()?;
20438        __struct.end_index = buf.get_i16_le()?;
20439        __struct.target_system = buf.get_u8()?;
20440        __struct.target_component = buf.get_u8()?;
20441        let tmp = buf.get_u8()?;
20442        __struct.mission_type =
20443            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20444                enum_type: "MavMissionType",
20445                value: tmp as u64,
20446            })?;
20447        Ok(__struct)
20448    }
20449    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20450        let mut __tmp = BytesMut::new(bytes);
20451        #[allow(clippy::absurd_extreme_comparisons)]
20452        #[allow(unused_comparisons)]
20453        if __tmp.remaining() < Self::ENCODED_LEN {
20454            panic!(
20455                "buffer is too small (need {} bytes, but got {})",
20456                Self::ENCODED_LEN,
20457                __tmp.remaining(),
20458            )
20459        }
20460        __tmp.put_i16_le(self.start_index);
20461        __tmp.put_i16_le(self.end_index);
20462        __tmp.put_u8(self.target_system);
20463        __tmp.put_u8(self.target_component);
20464        if matches!(version, MavlinkVersion::V2) {
20465            __tmp.put_u8(self.mission_type as u8);
20466            let len = __tmp.len();
20467            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20468        } else {
20469            __tmp.len()
20470        }
20471    }
20472}
20473#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20474#[doc = "Orientation of a mount."]
20475#[doc = ""]
20476#[doc = "ID: 265"]
20477#[derive(Debug, Clone, PartialEq)]
20478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20479#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20480#[cfg_attr(feature = "ts", derive(TS))]
20481#[cfg_attr(feature = "ts", ts(export))]
20482pub struct MOUNT_ORIENTATION_DATA {
20483    #[doc = "Timestamp (time since system boot)."]
20484    pub time_boot_ms: u32,
20485    #[doc = "Roll in global frame (set to NaN for invalid)."]
20486    pub roll: f32,
20487    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20488    pub pitch: f32,
20489    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20490    pub yaw: f32,
20491    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20492    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20493    pub yaw_absolute: f32,
20494}
20495impl MOUNT_ORIENTATION_DATA {
20496    pub const ENCODED_LEN: usize = 20usize;
20497    pub const DEFAULT: Self = Self {
20498        time_boot_ms: 0_u32,
20499        roll: 0.0_f32,
20500        pitch: 0.0_f32,
20501        yaw: 0.0_f32,
20502        yaw_absolute: 0.0_f32,
20503    };
20504    #[cfg(feature = "arbitrary")]
20505    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20506        use arbitrary::{Arbitrary, Unstructured};
20507        let mut buf = [0u8; 1024];
20508        rng.fill_bytes(&mut buf);
20509        let mut unstructured = Unstructured::new(&buf);
20510        Self::arbitrary(&mut unstructured).unwrap_or_default()
20511    }
20512}
20513impl Default for MOUNT_ORIENTATION_DATA {
20514    fn default() -> Self {
20515        Self::DEFAULT.clone()
20516    }
20517}
20518impl MessageData for MOUNT_ORIENTATION_DATA {
20519    type Message = MavMessage;
20520    const ID: u32 = 265u32;
20521    const NAME: &'static str = "MOUNT_ORIENTATION";
20522    const EXTRA_CRC: u8 = 26u8;
20523    const ENCODED_LEN: usize = 20usize;
20524    fn deser(
20525        _version: MavlinkVersion,
20526        __input: &[u8],
20527    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20528        let avail_len = __input.len();
20529        let mut payload_buf = [0; Self::ENCODED_LEN];
20530        let mut buf = if avail_len < Self::ENCODED_LEN {
20531            payload_buf[0..avail_len].copy_from_slice(__input);
20532            Bytes::new(&payload_buf)
20533        } else {
20534            Bytes::new(__input)
20535        };
20536        let mut __struct = Self::default();
20537        __struct.time_boot_ms = buf.get_u32_le()?;
20538        __struct.roll = buf.get_f32_le()?;
20539        __struct.pitch = buf.get_f32_le()?;
20540        __struct.yaw = buf.get_f32_le()?;
20541        __struct.yaw_absolute = buf.get_f32_le()?;
20542        Ok(__struct)
20543    }
20544    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20545        let mut __tmp = BytesMut::new(bytes);
20546        #[allow(clippy::absurd_extreme_comparisons)]
20547        #[allow(unused_comparisons)]
20548        if __tmp.remaining() < Self::ENCODED_LEN {
20549            panic!(
20550                "buffer is too small (need {} bytes, but got {})",
20551                Self::ENCODED_LEN,
20552                __tmp.remaining(),
20553            )
20554        }
20555        __tmp.put_u32_le(self.time_boot_ms);
20556        __tmp.put_f32_le(self.roll);
20557        __tmp.put_f32_le(self.pitch);
20558        __tmp.put_f32_le(self.yaw);
20559        if matches!(version, MavlinkVersion::V2) {
20560            __tmp.put_f32_le(self.yaw_absolute);
20561            let len = __tmp.len();
20562            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20563        } else {
20564            __tmp.len()
20565        }
20566    }
20567}
20568#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20569#[doc = ""]
20570#[doc = "ID: 251"]
20571#[derive(Debug, Clone, PartialEq)]
20572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20574#[cfg_attr(feature = "ts", derive(TS))]
20575#[cfg_attr(feature = "ts", ts(export))]
20576pub struct NAMED_VALUE_FLOAT_DATA {
20577    #[doc = "Timestamp (time since system boot)."]
20578    pub time_boot_ms: u32,
20579    #[doc = "Floating point value"]
20580    pub value: f32,
20581    #[doc = "Name of the debug variable"]
20582    #[cfg_attr(feature = "ts", ts(type = "string"))]
20583    pub name: CharArray<10>,
20584}
20585impl NAMED_VALUE_FLOAT_DATA {
20586    pub const ENCODED_LEN: usize = 18usize;
20587    pub const DEFAULT: Self = Self {
20588        time_boot_ms: 0_u32,
20589        value: 0.0_f32,
20590        name: CharArray::new([0_u8; 10usize]),
20591    };
20592    #[cfg(feature = "arbitrary")]
20593    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20594        use arbitrary::{Arbitrary, Unstructured};
20595        let mut buf = [0u8; 1024];
20596        rng.fill_bytes(&mut buf);
20597        let mut unstructured = Unstructured::new(&buf);
20598        Self::arbitrary(&mut unstructured).unwrap_or_default()
20599    }
20600}
20601impl Default for NAMED_VALUE_FLOAT_DATA {
20602    fn default() -> Self {
20603        Self::DEFAULT.clone()
20604    }
20605}
20606impl MessageData for NAMED_VALUE_FLOAT_DATA {
20607    type Message = MavMessage;
20608    const ID: u32 = 251u32;
20609    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20610    const EXTRA_CRC: u8 = 170u8;
20611    const ENCODED_LEN: usize = 18usize;
20612    fn deser(
20613        _version: MavlinkVersion,
20614        __input: &[u8],
20615    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20616        let avail_len = __input.len();
20617        let mut payload_buf = [0; Self::ENCODED_LEN];
20618        let mut buf = if avail_len < Self::ENCODED_LEN {
20619            payload_buf[0..avail_len].copy_from_slice(__input);
20620            Bytes::new(&payload_buf)
20621        } else {
20622            Bytes::new(__input)
20623        };
20624        let mut __struct = Self::default();
20625        __struct.time_boot_ms = buf.get_u32_le()?;
20626        __struct.value = buf.get_f32_le()?;
20627        let mut tmp = [0_u8; 10usize];
20628        for v in &mut tmp {
20629            *v = buf.get_u8()?;
20630        }
20631        __struct.name = CharArray::new(tmp);
20632        Ok(__struct)
20633    }
20634    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20635        let mut __tmp = BytesMut::new(bytes);
20636        #[allow(clippy::absurd_extreme_comparisons)]
20637        #[allow(unused_comparisons)]
20638        if __tmp.remaining() < Self::ENCODED_LEN {
20639            panic!(
20640                "buffer is too small (need {} bytes, but got {})",
20641                Self::ENCODED_LEN,
20642                __tmp.remaining(),
20643            )
20644        }
20645        __tmp.put_u32_le(self.time_boot_ms);
20646        __tmp.put_f32_le(self.value);
20647        for val in &self.name {
20648            __tmp.put_u8(*val);
20649        }
20650        if matches!(version, MavlinkVersion::V2) {
20651            let len = __tmp.len();
20652            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20653        } else {
20654            __tmp.len()
20655        }
20656    }
20657}
20658#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20659#[doc = ""]
20660#[doc = "ID: 252"]
20661#[derive(Debug, Clone, PartialEq)]
20662#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20664#[cfg_attr(feature = "ts", derive(TS))]
20665#[cfg_attr(feature = "ts", ts(export))]
20666pub struct NAMED_VALUE_INT_DATA {
20667    #[doc = "Timestamp (time since system boot)."]
20668    pub time_boot_ms: u32,
20669    #[doc = "Signed integer value"]
20670    pub value: i32,
20671    #[doc = "Name of the debug variable"]
20672    #[cfg_attr(feature = "ts", ts(type = "string"))]
20673    pub name: CharArray<10>,
20674}
20675impl NAMED_VALUE_INT_DATA {
20676    pub const ENCODED_LEN: usize = 18usize;
20677    pub const DEFAULT: Self = Self {
20678        time_boot_ms: 0_u32,
20679        value: 0_i32,
20680        name: CharArray::new([0_u8; 10usize]),
20681    };
20682    #[cfg(feature = "arbitrary")]
20683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20684        use arbitrary::{Arbitrary, Unstructured};
20685        let mut buf = [0u8; 1024];
20686        rng.fill_bytes(&mut buf);
20687        let mut unstructured = Unstructured::new(&buf);
20688        Self::arbitrary(&mut unstructured).unwrap_or_default()
20689    }
20690}
20691impl Default for NAMED_VALUE_INT_DATA {
20692    fn default() -> Self {
20693        Self::DEFAULT.clone()
20694    }
20695}
20696impl MessageData for NAMED_VALUE_INT_DATA {
20697    type Message = MavMessage;
20698    const ID: u32 = 252u32;
20699    const NAME: &'static str = "NAMED_VALUE_INT";
20700    const EXTRA_CRC: u8 = 44u8;
20701    const ENCODED_LEN: usize = 18usize;
20702    fn deser(
20703        _version: MavlinkVersion,
20704        __input: &[u8],
20705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20706        let avail_len = __input.len();
20707        let mut payload_buf = [0; Self::ENCODED_LEN];
20708        let mut buf = if avail_len < Self::ENCODED_LEN {
20709            payload_buf[0..avail_len].copy_from_slice(__input);
20710            Bytes::new(&payload_buf)
20711        } else {
20712            Bytes::new(__input)
20713        };
20714        let mut __struct = Self::default();
20715        __struct.time_boot_ms = buf.get_u32_le()?;
20716        __struct.value = buf.get_i32_le()?;
20717        let mut tmp = [0_u8; 10usize];
20718        for v in &mut tmp {
20719            *v = buf.get_u8()?;
20720        }
20721        __struct.name = CharArray::new(tmp);
20722        Ok(__struct)
20723    }
20724    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20725        let mut __tmp = BytesMut::new(bytes);
20726        #[allow(clippy::absurd_extreme_comparisons)]
20727        #[allow(unused_comparisons)]
20728        if __tmp.remaining() < Self::ENCODED_LEN {
20729            panic!(
20730                "buffer is too small (need {} bytes, but got {})",
20731                Self::ENCODED_LEN,
20732                __tmp.remaining(),
20733            )
20734        }
20735        __tmp.put_u32_le(self.time_boot_ms);
20736        __tmp.put_i32_le(self.value);
20737        for val in &self.name {
20738            __tmp.put_u8(*val);
20739        }
20740        if matches!(version, MavlinkVersion::V2) {
20741            let len = __tmp.len();
20742            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20743        } else {
20744            __tmp.len()
20745        }
20746    }
20747}
20748#[doc = "The state of the navigation and position controller."]
20749#[doc = ""]
20750#[doc = "ID: 62"]
20751#[derive(Debug, Clone, PartialEq)]
20752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20753#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20754#[cfg_attr(feature = "ts", derive(TS))]
20755#[cfg_attr(feature = "ts", ts(export))]
20756pub struct NAV_CONTROLLER_OUTPUT_DATA {
20757    #[doc = "Current desired roll"]
20758    pub nav_roll: f32,
20759    #[doc = "Current desired pitch"]
20760    pub nav_pitch: f32,
20761    #[doc = "Current altitude error"]
20762    pub alt_error: f32,
20763    #[doc = "Current airspeed error"]
20764    pub aspd_error: f32,
20765    #[doc = "Current crosstrack error on x-y plane"]
20766    pub xtrack_error: f32,
20767    #[doc = "Current desired heading"]
20768    pub nav_bearing: i16,
20769    #[doc = "Bearing to current waypoint/target"]
20770    pub target_bearing: i16,
20771    #[doc = "Distance to active waypoint"]
20772    pub wp_dist: u16,
20773}
20774impl NAV_CONTROLLER_OUTPUT_DATA {
20775    pub const ENCODED_LEN: usize = 26usize;
20776    pub const DEFAULT: Self = Self {
20777        nav_roll: 0.0_f32,
20778        nav_pitch: 0.0_f32,
20779        alt_error: 0.0_f32,
20780        aspd_error: 0.0_f32,
20781        xtrack_error: 0.0_f32,
20782        nav_bearing: 0_i16,
20783        target_bearing: 0_i16,
20784        wp_dist: 0_u16,
20785    };
20786    #[cfg(feature = "arbitrary")]
20787    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20788        use arbitrary::{Arbitrary, Unstructured};
20789        let mut buf = [0u8; 1024];
20790        rng.fill_bytes(&mut buf);
20791        let mut unstructured = Unstructured::new(&buf);
20792        Self::arbitrary(&mut unstructured).unwrap_or_default()
20793    }
20794}
20795impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20796    fn default() -> Self {
20797        Self::DEFAULT.clone()
20798    }
20799}
20800impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
20801    type Message = MavMessage;
20802    const ID: u32 = 62u32;
20803    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
20804    const EXTRA_CRC: u8 = 183u8;
20805    const ENCODED_LEN: usize = 26usize;
20806    fn deser(
20807        _version: MavlinkVersion,
20808        __input: &[u8],
20809    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20810        let avail_len = __input.len();
20811        let mut payload_buf = [0; Self::ENCODED_LEN];
20812        let mut buf = if avail_len < Self::ENCODED_LEN {
20813            payload_buf[0..avail_len].copy_from_slice(__input);
20814            Bytes::new(&payload_buf)
20815        } else {
20816            Bytes::new(__input)
20817        };
20818        let mut __struct = Self::default();
20819        __struct.nav_roll = buf.get_f32_le()?;
20820        __struct.nav_pitch = buf.get_f32_le()?;
20821        __struct.alt_error = buf.get_f32_le()?;
20822        __struct.aspd_error = buf.get_f32_le()?;
20823        __struct.xtrack_error = buf.get_f32_le()?;
20824        __struct.nav_bearing = buf.get_i16_le()?;
20825        __struct.target_bearing = buf.get_i16_le()?;
20826        __struct.wp_dist = buf.get_u16_le()?;
20827        Ok(__struct)
20828    }
20829    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20830        let mut __tmp = BytesMut::new(bytes);
20831        #[allow(clippy::absurd_extreme_comparisons)]
20832        #[allow(unused_comparisons)]
20833        if __tmp.remaining() < Self::ENCODED_LEN {
20834            panic!(
20835                "buffer is too small (need {} bytes, but got {})",
20836                Self::ENCODED_LEN,
20837                __tmp.remaining(),
20838            )
20839        }
20840        __tmp.put_f32_le(self.nav_roll);
20841        __tmp.put_f32_le(self.nav_pitch);
20842        __tmp.put_f32_le(self.alt_error);
20843        __tmp.put_f32_le(self.aspd_error);
20844        __tmp.put_f32_le(self.xtrack_error);
20845        __tmp.put_i16_le(self.nav_bearing);
20846        __tmp.put_i16_le(self.target_bearing);
20847        __tmp.put_u16_le(self.wp_dist);
20848        if matches!(version, MavlinkVersion::V2) {
20849            let len = __tmp.len();
20850            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20851        } else {
20852            __tmp.len()
20853        }
20854    }
20855}
20856#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
20857#[doc = ""]
20858#[doc = "ID: 330"]
20859#[derive(Debug, Clone, PartialEq)]
20860#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20861#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20862#[cfg_attr(feature = "ts", derive(TS))]
20863#[cfg_attr(feature = "ts", ts(export))]
20864pub struct OBSTACLE_DISTANCE_DATA {
20865    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20866    pub time_usec: u64,
20867    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
20868    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20869    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20870    pub distances: [u16; 72],
20871    #[doc = "Minimum distance the sensor can measure."]
20872    pub min_distance: u16,
20873    #[doc = "Maximum distance the sensor can measure."]
20874    pub max_distance: u16,
20875    #[doc = "Class id of the distance sensor type."]
20876    pub sensor_type: MavDistanceSensor,
20877    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
20878    pub increment: u8,
20879    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
20880    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20881    pub increment_f: f32,
20882    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
20883    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20884    pub angle_offset: f32,
20885    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
20886    #[cfg_attr(feature = "serde", serde(default))]
20887    pub frame: MavFrame,
20888}
20889impl OBSTACLE_DISTANCE_DATA {
20890    pub const ENCODED_LEN: usize = 167usize;
20891    pub const DEFAULT: Self = Self {
20892        time_usec: 0_u64,
20893        distances: [0_u16; 72usize],
20894        min_distance: 0_u16,
20895        max_distance: 0_u16,
20896        sensor_type: MavDistanceSensor::DEFAULT,
20897        increment: 0_u8,
20898        increment_f: 0.0_f32,
20899        angle_offset: 0.0_f32,
20900        frame: MavFrame::DEFAULT,
20901    };
20902    #[cfg(feature = "arbitrary")]
20903    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20904        use arbitrary::{Arbitrary, Unstructured};
20905        let mut buf = [0u8; 1024];
20906        rng.fill_bytes(&mut buf);
20907        let mut unstructured = Unstructured::new(&buf);
20908        Self::arbitrary(&mut unstructured).unwrap_or_default()
20909    }
20910}
20911impl Default for OBSTACLE_DISTANCE_DATA {
20912    fn default() -> Self {
20913        Self::DEFAULT.clone()
20914    }
20915}
20916impl MessageData for OBSTACLE_DISTANCE_DATA {
20917    type Message = MavMessage;
20918    const ID: u32 = 330u32;
20919    const NAME: &'static str = "OBSTACLE_DISTANCE";
20920    const EXTRA_CRC: u8 = 23u8;
20921    const ENCODED_LEN: usize = 167usize;
20922    fn deser(
20923        _version: MavlinkVersion,
20924        __input: &[u8],
20925    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20926        let avail_len = __input.len();
20927        let mut payload_buf = [0; Self::ENCODED_LEN];
20928        let mut buf = if avail_len < Self::ENCODED_LEN {
20929            payload_buf[0..avail_len].copy_from_slice(__input);
20930            Bytes::new(&payload_buf)
20931        } else {
20932            Bytes::new(__input)
20933        };
20934        let mut __struct = Self::default();
20935        __struct.time_usec = buf.get_u64_le()?;
20936        for v in &mut __struct.distances {
20937            let val = buf.get_u16_le()?;
20938            *v = val;
20939        }
20940        __struct.min_distance = buf.get_u16_le()?;
20941        __struct.max_distance = buf.get_u16_le()?;
20942        let tmp = buf.get_u8()?;
20943        __struct.sensor_type =
20944            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20945                enum_type: "MavDistanceSensor",
20946                value: tmp as u64,
20947            })?;
20948        __struct.increment = buf.get_u8()?;
20949        __struct.increment_f = buf.get_f32_le()?;
20950        __struct.angle_offset = buf.get_f32_le()?;
20951        let tmp = buf.get_u8()?;
20952        __struct.frame =
20953            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20954                enum_type: "MavFrame",
20955                value: tmp as u64,
20956            })?;
20957        Ok(__struct)
20958    }
20959    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20960        let mut __tmp = BytesMut::new(bytes);
20961        #[allow(clippy::absurd_extreme_comparisons)]
20962        #[allow(unused_comparisons)]
20963        if __tmp.remaining() < Self::ENCODED_LEN {
20964            panic!(
20965                "buffer is too small (need {} bytes, but got {})",
20966                Self::ENCODED_LEN,
20967                __tmp.remaining(),
20968            )
20969        }
20970        __tmp.put_u64_le(self.time_usec);
20971        for val in &self.distances {
20972            __tmp.put_u16_le(*val);
20973        }
20974        __tmp.put_u16_le(self.min_distance);
20975        __tmp.put_u16_le(self.max_distance);
20976        __tmp.put_u8(self.sensor_type as u8);
20977        __tmp.put_u8(self.increment);
20978        if matches!(version, MavlinkVersion::V2) {
20979            __tmp.put_f32_le(self.increment_f);
20980            __tmp.put_f32_le(self.angle_offset);
20981            __tmp.put_u8(self.frame as u8);
20982            let len = __tmp.len();
20983            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20984        } else {
20985            __tmp.len()
20986        }
20987    }
20988}
20989#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
20990#[doc = ""]
20991#[doc = "ID: 331"]
20992#[derive(Debug, Clone, PartialEq)]
20993#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20995#[cfg_attr(feature = "ts", derive(TS))]
20996#[cfg_attr(feature = "ts", ts(export))]
20997pub struct ODOMETRY_DATA {
20998    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20999    pub time_usec: u64,
21000    #[doc = "X Position"]
21001    pub x: f32,
21002    #[doc = "Y Position"]
21003    pub y: f32,
21004    #[doc = "Z Position"]
21005    pub z: f32,
21006    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21007    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21008    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21009    pub q: [f32; 4],
21010    #[doc = "X linear speed"]
21011    pub vx: f32,
21012    #[doc = "Y linear speed"]
21013    pub vy: f32,
21014    #[doc = "Z linear speed"]
21015    pub vz: f32,
21016    #[doc = "Roll angular speed"]
21017    pub rollspeed: f32,
21018    #[doc = "Pitch angular speed"]
21019    pub pitchspeed: f32,
21020    #[doc = "Yaw angular speed"]
21021    pub yawspeed: f32,
21022    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21023    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21024    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21025    pub pose_covariance: [f32; 21],
21026    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21027    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21028    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21029    pub velocity_covariance: [f32; 21],
21030    #[doc = "Coordinate frame of reference for the pose data."]
21031    pub frame_id: MavFrame,
21032    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21033    pub child_frame_id: MavFrame,
21034    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21035    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21036    pub reset_counter: u8,
21037    #[doc = "Type of estimator that is providing the odometry."]
21038    #[cfg_attr(feature = "serde", serde(default))]
21039    pub estimator_type: MavEstimatorType,
21040    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21041    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21042    pub quality: i8,
21043}
21044impl ODOMETRY_DATA {
21045    pub const ENCODED_LEN: usize = 233usize;
21046    pub const DEFAULT: Self = Self {
21047        time_usec: 0_u64,
21048        x: 0.0_f32,
21049        y: 0.0_f32,
21050        z: 0.0_f32,
21051        q: [0.0_f32; 4usize],
21052        vx: 0.0_f32,
21053        vy: 0.0_f32,
21054        vz: 0.0_f32,
21055        rollspeed: 0.0_f32,
21056        pitchspeed: 0.0_f32,
21057        yawspeed: 0.0_f32,
21058        pose_covariance: [0.0_f32; 21usize],
21059        velocity_covariance: [0.0_f32; 21usize],
21060        frame_id: MavFrame::DEFAULT,
21061        child_frame_id: MavFrame::DEFAULT,
21062        reset_counter: 0_u8,
21063        estimator_type: MavEstimatorType::DEFAULT,
21064        quality: 0_i8,
21065    };
21066    #[cfg(feature = "arbitrary")]
21067    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21068        use arbitrary::{Arbitrary, Unstructured};
21069        let mut buf = [0u8; 1024];
21070        rng.fill_bytes(&mut buf);
21071        let mut unstructured = Unstructured::new(&buf);
21072        Self::arbitrary(&mut unstructured).unwrap_or_default()
21073    }
21074}
21075impl Default for ODOMETRY_DATA {
21076    fn default() -> Self {
21077        Self::DEFAULT.clone()
21078    }
21079}
21080impl MessageData for ODOMETRY_DATA {
21081    type Message = MavMessage;
21082    const ID: u32 = 331u32;
21083    const NAME: &'static str = "ODOMETRY";
21084    const EXTRA_CRC: u8 = 91u8;
21085    const ENCODED_LEN: usize = 233usize;
21086    fn deser(
21087        _version: MavlinkVersion,
21088        __input: &[u8],
21089    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21090        let avail_len = __input.len();
21091        let mut payload_buf = [0; Self::ENCODED_LEN];
21092        let mut buf = if avail_len < Self::ENCODED_LEN {
21093            payload_buf[0..avail_len].copy_from_slice(__input);
21094            Bytes::new(&payload_buf)
21095        } else {
21096            Bytes::new(__input)
21097        };
21098        let mut __struct = Self::default();
21099        __struct.time_usec = buf.get_u64_le()?;
21100        __struct.x = buf.get_f32_le()?;
21101        __struct.y = buf.get_f32_le()?;
21102        __struct.z = buf.get_f32_le()?;
21103        for v in &mut __struct.q {
21104            let val = buf.get_f32_le()?;
21105            *v = val;
21106        }
21107        __struct.vx = buf.get_f32_le()?;
21108        __struct.vy = buf.get_f32_le()?;
21109        __struct.vz = buf.get_f32_le()?;
21110        __struct.rollspeed = buf.get_f32_le()?;
21111        __struct.pitchspeed = buf.get_f32_le()?;
21112        __struct.yawspeed = buf.get_f32_le()?;
21113        for v in &mut __struct.pose_covariance {
21114            let val = buf.get_f32_le()?;
21115            *v = val;
21116        }
21117        for v in &mut __struct.velocity_covariance {
21118            let val = buf.get_f32_le()?;
21119            *v = val;
21120        }
21121        let tmp = buf.get_u8()?;
21122        __struct.frame_id =
21123            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21124                enum_type: "MavFrame",
21125                value: tmp as u64,
21126            })?;
21127        let tmp = buf.get_u8()?;
21128        __struct.child_frame_id =
21129            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21130                enum_type: "MavFrame",
21131                value: tmp as u64,
21132            })?;
21133        __struct.reset_counter = buf.get_u8()?;
21134        let tmp = buf.get_u8()?;
21135        __struct.estimator_type =
21136            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21137                enum_type: "MavEstimatorType",
21138                value: tmp as u64,
21139            })?;
21140        __struct.quality = buf.get_i8()?;
21141        Ok(__struct)
21142    }
21143    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21144        let mut __tmp = BytesMut::new(bytes);
21145        #[allow(clippy::absurd_extreme_comparisons)]
21146        #[allow(unused_comparisons)]
21147        if __tmp.remaining() < Self::ENCODED_LEN {
21148            panic!(
21149                "buffer is too small (need {} bytes, but got {})",
21150                Self::ENCODED_LEN,
21151                __tmp.remaining(),
21152            )
21153        }
21154        __tmp.put_u64_le(self.time_usec);
21155        __tmp.put_f32_le(self.x);
21156        __tmp.put_f32_le(self.y);
21157        __tmp.put_f32_le(self.z);
21158        for val in &self.q {
21159            __tmp.put_f32_le(*val);
21160        }
21161        __tmp.put_f32_le(self.vx);
21162        __tmp.put_f32_le(self.vy);
21163        __tmp.put_f32_le(self.vz);
21164        __tmp.put_f32_le(self.rollspeed);
21165        __tmp.put_f32_le(self.pitchspeed);
21166        __tmp.put_f32_le(self.yawspeed);
21167        for val in &self.pose_covariance {
21168            __tmp.put_f32_le(*val);
21169        }
21170        for val in &self.velocity_covariance {
21171            __tmp.put_f32_le(*val);
21172        }
21173        __tmp.put_u8(self.frame_id as u8);
21174        __tmp.put_u8(self.child_frame_id as u8);
21175        if matches!(version, MavlinkVersion::V2) {
21176            __tmp.put_u8(self.reset_counter);
21177            __tmp.put_u8(self.estimator_type as u8);
21178            __tmp.put_i8(self.quality);
21179            let len = __tmp.len();
21180            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21181        } else {
21182            __tmp.len()
21183        }
21184    }
21185}
21186#[doc = "Hardware status sent by an onboard computer."]
21187#[doc = ""]
21188#[doc = "ID: 390"]
21189#[derive(Debug, Clone, PartialEq)]
21190#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21191#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21192#[cfg_attr(feature = "ts", derive(TS))]
21193#[cfg_attr(feature = "ts", ts(export))]
21194pub struct ONBOARD_COMPUTER_STATUS_DATA {
21195    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21196    pub time_usec: u64,
21197    #[doc = "Time since system boot."]
21198    pub uptime: u32,
21199    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21200    pub ram_usage: u32,
21201    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21202    pub ram_total: u32,
21203    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21204    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21205    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21206    pub storage_type: [u32; 4],
21207    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21208    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21209    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21210    pub storage_usage: [u32; 4],
21211    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21212    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21213    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21214    pub storage_total: [u32; 4],
21215    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21216    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21217    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21218    pub link_type: [u32; 6],
21219    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21220    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21221    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21222    pub link_tx_rate: [u32; 6],
21223    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21224    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21225    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21226    pub link_rx_rate: [u32; 6],
21227    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21228    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21229    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21230    pub link_tx_max: [u32; 6],
21231    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21232    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21233    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21234    pub link_rx_max: [u32; 6],
21235    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21236    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21237    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21238    pub fan_speed: [i16; 4],
21239    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21240    pub mavtype: u8,
21241    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21242    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21243    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21244    pub cpu_cores: [u8; 8],
21245    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21246    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21247    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21248    pub cpu_combined: [u8; 10],
21249    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21250    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21251    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21252    pub gpu_cores: [u8; 4],
21253    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21254    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21255    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21256    pub gpu_combined: [u8; 10],
21257    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21258    pub temperature_board: i8,
21259    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21260    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21261    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21262    pub temperature_core: [i8; 8],
21263}
21264impl ONBOARD_COMPUTER_STATUS_DATA {
21265    pub const ENCODED_LEN: usize = 238usize;
21266    pub const DEFAULT: Self = Self {
21267        time_usec: 0_u64,
21268        uptime: 0_u32,
21269        ram_usage: 0_u32,
21270        ram_total: 0_u32,
21271        storage_type: [0_u32; 4usize],
21272        storage_usage: [0_u32; 4usize],
21273        storage_total: [0_u32; 4usize],
21274        link_type: [0_u32; 6usize],
21275        link_tx_rate: [0_u32; 6usize],
21276        link_rx_rate: [0_u32; 6usize],
21277        link_tx_max: [0_u32; 6usize],
21278        link_rx_max: [0_u32; 6usize],
21279        fan_speed: [0_i16; 4usize],
21280        mavtype: 0_u8,
21281        cpu_cores: [0_u8; 8usize],
21282        cpu_combined: [0_u8; 10usize],
21283        gpu_cores: [0_u8; 4usize],
21284        gpu_combined: [0_u8; 10usize],
21285        temperature_board: 0_i8,
21286        temperature_core: [0_i8; 8usize],
21287    };
21288    #[cfg(feature = "arbitrary")]
21289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21290        use arbitrary::{Arbitrary, Unstructured};
21291        let mut buf = [0u8; 1024];
21292        rng.fill_bytes(&mut buf);
21293        let mut unstructured = Unstructured::new(&buf);
21294        Self::arbitrary(&mut unstructured).unwrap_or_default()
21295    }
21296}
21297impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21298    fn default() -> Self {
21299        Self::DEFAULT.clone()
21300    }
21301}
21302impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21303    type Message = MavMessage;
21304    const ID: u32 = 390u32;
21305    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21306    const EXTRA_CRC: u8 = 156u8;
21307    const ENCODED_LEN: usize = 238usize;
21308    fn deser(
21309        _version: MavlinkVersion,
21310        __input: &[u8],
21311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21312        let avail_len = __input.len();
21313        let mut payload_buf = [0; Self::ENCODED_LEN];
21314        let mut buf = if avail_len < Self::ENCODED_LEN {
21315            payload_buf[0..avail_len].copy_from_slice(__input);
21316            Bytes::new(&payload_buf)
21317        } else {
21318            Bytes::new(__input)
21319        };
21320        let mut __struct = Self::default();
21321        __struct.time_usec = buf.get_u64_le()?;
21322        __struct.uptime = buf.get_u32_le()?;
21323        __struct.ram_usage = buf.get_u32_le()?;
21324        __struct.ram_total = buf.get_u32_le()?;
21325        for v in &mut __struct.storage_type {
21326            let val = buf.get_u32_le()?;
21327            *v = val;
21328        }
21329        for v in &mut __struct.storage_usage {
21330            let val = buf.get_u32_le()?;
21331            *v = val;
21332        }
21333        for v in &mut __struct.storage_total {
21334            let val = buf.get_u32_le()?;
21335            *v = val;
21336        }
21337        for v in &mut __struct.link_type {
21338            let val = buf.get_u32_le()?;
21339            *v = val;
21340        }
21341        for v in &mut __struct.link_tx_rate {
21342            let val = buf.get_u32_le()?;
21343            *v = val;
21344        }
21345        for v in &mut __struct.link_rx_rate {
21346            let val = buf.get_u32_le()?;
21347            *v = val;
21348        }
21349        for v in &mut __struct.link_tx_max {
21350            let val = buf.get_u32_le()?;
21351            *v = val;
21352        }
21353        for v in &mut __struct.link_rx_max {
21354            let val = buf.get_u32_le()?;
21355            *v = val;
21356        }
21357        for v in &mut __struct.fan_speed {
21358            let val = buf.get_i16_le()?;
21359            *v = val;
21360        }
21361        __struct.mavtype = buf.get_u8()?;
21362        for v in &mut __struct.cpu_cores {
21363            let val = buf.get_u8()?;
21364            *v = val;
21365        }
21366        for v in &mut __struct.cpu_combined {
21367            let val = buf.get_u8()?;
21368            *v = val;
21369        }
21370        for v in &mut __struct.gpu_cores {
21371            let val = buf.get_u8()?;
21372            *v = val;
21373        }
21374        for v in &mut __struct.gpu_combined {
21375            let val = buf.get_u8()?;
21376            *v = val;
21377        }
21378        __struct.temperature_board = buf.get_i8()?;
21379        for v in &mut __struct.temperature_core {
21380            let val = buf.get_i8()?;
21381            *v = val;
21382        }
21383        Ok(__struct)
21384    }
21385    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21386        let mut __tmp = BytesMut::new(bytes);
21387        #[allow(clippy::absurd_extreme_comparisons)]
21388        #[allow(unused_comparisons)]
21389        if __tmp.remaining() < Self::ENCODED_LEN {
21390            panic!(
21391                "buffer is too small (need {} bytes, but got {})",
21392                Self::ENCODED_LEN,
21393                __tmp.remaining(),
21394            )
21395        }
21396        __tmp.put_u64_le(self.time_usec);
21397        __tmp.put_u32_le(self.uptime);
21398        __tmp.put_u32_le(self.ram_usage);
21399        __tmp.put_u32_le(self.ram_total);
21400        for val in &self.storage_type {
21401            __tmp.put_u32_le(*val);
21402        }
21403        for val in &self.storage_usage {
21404            __tmp.put_u32_le(*val);
21405        }
21406        for val in &self.storage_total {
21407            __tmp.put_u32_le(*val);
21408        }
21409        for val in &self.link_type {
21410            __tmp.put_u32_le(*val);
21411        }
21412        for val in &self.link_tx_rate {
21413            __tmp.put_u32_le(*val);
21414        }
21415        for val in &self.link_rx_rate {
21416            __tmp.put_u32_le(*val);
21417        }
21418        for val in &self.link_tx_max {
21419            __tmp.put_u32_le(*val);
21420        }
21421        for val in &self.link_rx_max {
21422            __tmp.put_u32_le(*val);
21423        }
21424        for val in &self.fan_speed {
21425            __tmp.put_i16_le(*val);
21426        }
21427        __tmp.put_u8(self.mavtype);
21428        for val in &self.cpu_cores {
21429            __tmp.put_u8(*val);
21430        }
21431        for val in &self.cpu_combined {
21432            __tmp.put_u8(*val);
21433        }
21434        for val in &self.gpu_cores {
21435            __tmp.put_u8(*val);
21436        }
21437        for val in &self.gpu_combined {
21438            __tmp.put_u8(*val);
21439        }
21440        __tmp.put_i8(self.temperature_board);
21441        for val in &self.temperature_core {
21442            __tmp.put_i8(*val);
21443        }
21444        if matches!(version, MavlinkVersion::V2) {
21445            let len = __tmp.len();
21446            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21447        } else {
21448            __tmp.len()
21449        }
21450    }
21451}
21452#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21453#[doc = ""]
21454#[doc = "ID: 12918"]
21455#[derive(Debug, Clone, PartialEq)]
21456#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21457#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21458#[cfg_attr(feature = "ts", derive(TS))]
21459#[cfg_attr(feature = "ts", ts(export))]
21460pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21461    #[doc = "Status level indicating if arming is allowed."]
21462    pub status: MavOdidArmStatus,
21463    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21464    #[cfg_attr(feature = "ts", ts(type = "string"))]
21465    pub error: CharArray<50>,
21466}
21467impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21468    pub const ENCODED_LEN: usize = 51usize;
21469    pub const DEFAULT: Self = Self {
21470        status: MavOdidArmStatus::DEFAULT,
21471        error: CharArray::new([0_u8; 50usize]),
21472    };
21473    #[cfg(feature = "arbitrary")]
21474    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21475        use arbitrary::{Arbitrary, Unstructured};
21476        let mut buf = [0u8; 1024];
21477        rng.fill_bytes(&mut buf);
21478        let mut unstructured = Unstructured::new(&buf);
21479        Self::arbitrary(&mut unstructured).unwrap_or_default()
21480    }
21481}
21482impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21483    fn default() -> Self {
21484        Self::DEFAULT.clone()
21485    }
21486}
21487impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21488    type Message = MavMessage;
21489    const ID: u32 = 12918u32;
21490    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21491    const EXTRA_CRC: u8 = 139u8;
21492    const ENCODED_LEN: usize = 51usize;
21493    fn deser(
21494        _version: MavlinkVersion,
21495        __input: &[u8],
21496    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21497        let avail_len = __input.len();
21498        let mut payload_buf = [0; Self::ENCODED_LEN];
21499        let mut buf = if avail_len < Self::ENCODED_LEN {
21500            payload_buf[0..avail_len].copy_from_slice(__input);
21501            Bytes::new(&payload_buf)
21502        } else {
21503            Bytes::new(__input)
21504        };
21505        let mut __struct = Self::default();
21506        let tmp = buf.get_u8()?;
21507        __struct.status =
21508            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21509                enum_type: "MavOdidArmStatus",
21510                value: tmp as u64,
21511            })?;
21512        let mut tmp = [0_u8; 50usize];
21513        for v in &mut tmp {
21514            *v = buf.get_u8()?;
21515        }
21516        __struct.error = CharArray::new(tmp);
21517        Ok(__struct)
21518    }
21519    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21520        let mut __tmp = BytesMut::new(bytes);
21521        #[allow(clippy::absurd_extreme_comparisons)]
21522        #[allow(unused_comparisons)]
21523        if __tmp.remaining() < Self::ENCODED_LEN {
21524            panic!(
21525                "buffer is too small (need {} bytes, but got {})",
21526                Self::ENCODED_LEN,
21527                __tmp.remaining(),
21528            )
21529        }
21530        __tmp.put_u8(self.status as u8);
21531        for val in &self.error {
21532            __tmp.put_u8(*val);
21533        }
21534        if matches!(version, MavlinkVersion::V2) {
21535            let len = __tmp.len();
21536            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21537        } else {
21538            __tmp.len()
21539        }
21540    }
21541}
21542#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21543#[doc = ""]
21544#[doc = "ID: 12902"]
21545#[derive(Debug, Clone, PartialEq)]
21546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21548#[cfg_attr(feature = "ts", derive(TS))]
21549#[cfg_attr(feature = "ts", ts(export))]
21550pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21551    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21552    pub timestamp: u32,
21553    #[doc = "System ID (0 for broadcast)."]
21554    pub target_system: u8,
21555    #[doc = "Component ID (0 for broadcast)."]
21556    pub target_component: u8,
21557    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21558    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21559    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21560    pub id_or_mac: [u8; 20],
21561    #[doc = "Indicates the type of authentication."]
21562    pub authentication_type: MavOdidAuthType,
21563    #[doc = "Allowed range is 0 - 15."]
21564    pub data_page: u8,
21565    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21566    pub last_page_index: u8,
21567    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21568    pub length: u8,
21569    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21570    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21571    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21572    pub authentication_data: [u8; 23],
21573}
21574impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21575    pub const ENCODED_LEN: usize = 53usize;
21576    pub const DEFAULT: Self = Self {
21577        timestamp: 0_u32,
21578        target_system: 0_u8,
21579        target_component: 0_u8,
21580        id_or_mac: [0_u8; 20usize],
21581        authentication_type: MavOdidAuthType::DEFAULT,
21582        data_page: 0_u8,
21583        last_page_index: 0_u8,
21584        length: 0_u8,
21585        authentication_data: [0_u8; 23usize],
21586    };
21587    #[cfg(feature = "arbitrary")]
21588    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21589        use arbitrary::{Arbitrary, Unstructured};
21590        let mut buf = [0u8; 1024];
21591        rng.fill_bytes(&mut buf);
21592        let mut unstructured = Unstructured::new(&buf);
21593        Self::arbitrary(&mut unstructured).unwrap_or_default()
21594    }
21595}
21596impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21597    fn default() -> Self {
21598        Self::DEFAULT.clone()
21599    }
21600}
21601impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21602    type Message = MavMessage;
21603    const ID: u32 = 12902u32;
21604    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21605    const EXTRA_CRC: u8 = 140u8;
21606    const ENCODED_LEN: usize = 53usize;
21607    fn deser(
21608        _version: MavlinkVersion,
21609        __input: &[u8],
21610    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21611        let avail_len = __input.len();
21612        let mut payload_buf = [0; Self::ENCODED_LEN];
21613        let mut buf = if avail_len < Self::ENCODED_LEN {
21614            payload_buf[0..avail_len].copy_from_slice(__input);
21615            Bytes::new(&payload_buf)
21616        } else {
21617            Bytes::new(__input)
21618        };
21619        let mut __struct = Self::default();
21620        __struct.timestamp = buf.get_u32_le()?;
21621        __struct.target_system = buf.get_u8()?;
21622        __struct.target_component = buf.get_u8()?;
21623        for v in &mut __struct.id_or_mac {
21624            let val = buf.get_u8()?;
21625            *v = val;
21626        }
21627        let tmp = buf.get_u8()?;
21628        __struct.authentication_type =
21629            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21630                enum_type: "MavOdidAuthType",
21631                value: tmp as u64,
21632            })?;
21633        __struct.data_page = buf.get_u8()?;
21634        __struct.last_page_index = buf.get_u8()?;
21635        __struct.length = buf.get_u8()?;
21636        for v in &mut __struct.authentication_data {
21637            let val = buf.get_u8()?;
21638            *v = val;
21639        }
21640        Ok(__struct)
21641    }
21642    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21643        let mut __tmp = BytesMut::new(bytes);
21644        #[allow(clippy::absurd_extreme_comparisons)]
21645        #[allow(unused_comparisons)]
21646        if __tmp.remaining() < Self::ENCODED_LEN {
21647            panic!(
21648                "buffer is too small (need {} bytes, but got {})",
21649                Self::ENCODED_LEN,
21650                __tmp.remaining(),
21651            )
21652        }
21653        __tmp.put_u32_le(self.timestamp);
21654        __tmp.put_u8(self.target_system);
21655        __tmp.put_u8(self.target_component);
21656        for val in &self.id_or_mac {
21657            __tmp.put_u8(*val);
21658        }
21659        __tmp.put_u8(self.authentication_type as u8);
21660        __tmp.put_u8(self.data_page);
21661        __tmp.put_u8(self.last_page_index);
21662        __tmp.put_u8(self.length);
21663        for val in &self.authentication_data {
21664            __tmp.put_u8(*val);
21665        }
21666        if matches!(version, MavlinkVersion::V2) {
21667            let len = __tmp.len();
21668            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21669        } else {
21670            __tmp.len()
21671        }
21672    }
21673}
21674#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21675#[doc = ""]
21676#[doc = "ID: 12900"]
21677#[derive(Debug, Clone, PartialEq)]
21678#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21680#[cfg_attr(feature = "ts", derive(TS))]
21681#[cfg_attr(feature = "ts", ts(export))]
21682pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21683    #[doc = "System ID (0 for broadcast)."]
21684    pub target_system: u8,
21685    #[doc = "Component ID (0 for broadcast)."]
21686    pub target_component: u8,
21687    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21688    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21689    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21690    pub id_or_mac: [u8; 20],
21691    #[doc = "Indicates the format for the uas_id field of this message."]
21692    pub id_type: MavOdidIdType,
21693    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21694    pub ua_type: MavOdidUaType,
21695    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21696    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21697    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21698    pub uas_id: [u8; 20],
21699}
21700impl OPEN_DRONE_ID_BASIC_ID_DATA {
21701    pub const ENCODED_LEN: usize = 44usize;
21702    pub const DEFAULT: Self = Self {
21703        target_system: 0_u8,
21704        target_component: 0_u8,
21705        id_or_mac: [0_u8; 20usize],
21706        id_type: MavOdidIdType::DEFAULT,
21707        ua_type: MavOdidUaType::DEFAULT,
21708        uas_id: [0_u8; 20usize],
21709    };
21710    #[cfg(feature = "arbitrary")]
21711    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21712        use arbitrary::{Arbitrary, Unstructured};
21713        let mut buf = [0u8; 1024];
21714        rng.fill_bytes(&mut buf);
21715        let mut unstructured = Unstructured::new(&buf);
21716        Self::arbitrary(&mut unstructured).unwrap_or_default()
21717    }
21718}
21719impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21720    fn default() -> Self {
21721        Self::DEFAULT.clone()
21722    }
21723}
21724impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21725    type Message = MavMessage;
21726    const ID: u32 = 12900u32;
21727    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21728    const EXTRA_CRC: u8 = 114u8;
21729    const ENCODED_LEN: usize = 44usize;
21730    fn deser(
21731        _version: MavlinkVersion,
21732        __input: &[u8],
21733    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21734        let avail_len = __input.len();
21735        let mut payload_buf = [0; Self::ENCODED_LEN];
21736        let mut buf = if avail_len < Self::ENCODED_LEN {
21737            payload_buf[0..avail_len].copy_from_slice(__input);
21738            Bytes::new(&payload_buf)
21739        } else {
21740            Bytes::new(__input)
21741        };
21742        let mut __struct = Self::default();
21743        __struct.target_system = buf.get_u8()?;
21744        __struct.target_component = buf.get_u8()?;
21745        for v in &mut __struct.id_or_mac {
21746            let val = buf.get_u8()?;
21747            *v = val;
21748        }
21749        let tmp = buf.get_u8()?;
21750        __struct.id_type =
21751            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21752                enum_type: "MavOdidIdType",
21753                value: tmp as u64,
21754            })?;
21755        let tmp = buf.get_u8()?;
21756        __struct.ua_type =
21757            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21758                enum_type: "MavOdidUaType",
21759                value: tmp as u64,
21760            })?;
21761        for v in &mut __struct.uas_id {
21762            let val = buf.get_u8()?;
21763            *v = val;
21764        }
21765        Ok(__struct)
21766    }
21767    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21768        let mut __tmp = BytesMut::new(bytes);
21769        #[allow(clippy::absurd_extreme_comparisons)]
21770        #[allow(unused_comparisons)]
21771        if __tmp.remaining() < Self::ENCODED_LEN {
21772            panic!(
21773                "buffer is too small (need {} bytes, but got {})",
21774                Self::ENCODED_LEN,
21775                __tmp.remaining(),
21776            )
21777        }
21778        __tmp.put_u8(self.target_system);
21779        __tmp.put_u8(self.target_component);
21780        for val in &self.id_or_mac {
21781            __tmp.put_u8(*val);
21782        }
21783        __tmp.put_u8(self.id_type as u8);
21784        __tmp.put_u8(self.ua_type as u8);
21785        for val in &self.uas_id {
21786            __tmp.put_u8(*val);
21787        }
21788        if matches!(version, MavlinkVersion::V2) {
21789            let len = __tmp.len();
21790            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21791        } else {
21792            __tmp.len()
21793        }
21794    }
21795}
21796#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21797#[doc = ""]
21798#[doc = "ID: 12901"]
21799#[derive(Debug, Clone, PartialEq)]
21800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21802#[cfg_attr(feature = "ts", derive(TS))]
21803#[cfg_attr(feature = "ts", ts(export))]
21804pub struct OPEN_DRONE_ID_LOCATION_DATA {
21805    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21806    pub latitude: i32,
21807    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21808    pub longitude: i32,
21809    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21810    pub altitude_barometric: f32,
21811    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21812    pub altitude_geodetic: f32,
21813    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
21814    pub height: f32,
21815    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
21816    pub timestamp: f32,
21817    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
21818    pub direction: u16,
21819    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
21820    pub speed_horizontal: u16,
21821    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
21822    pub speed_vertical: i16,
21823    #[doc = "System ID (0 for broadcast)."]
21824    pub target_system: u8,
21825    #[doc = "Component ID (0 for broadcast)."]
21826    pub target_component: u8,
21827    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21828    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21829    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21830    pub id_or_mac: [u8; 20],
21831    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
21832    pub status: MavOdidStatus,
21833    #[doc = "Indicates the reference point for the height field."]
21834    pub height_reference: MavOdidHeightRef,
21835    #[doc = "The accuracy of the horizontal position."]
21836    pub horizontal_accuracy: MavOdidHorAcc,
21837    #[doc = "The accuracy of the vertical position."]
21838    pub vertical_accuracy: MavOdidVerAcc,
21839    #[doc = "The accuracy of the barometric altitude."]
21840    pub barometer_accuracy: MavOdidVerAcc,
21841    #[doc = "The accuracy of the horizontal and vertical speed."]
21842    pub speed_accuracy: MavOdidSpeedAcc,
21843    #[doc = "The accuracy of the timestamps."]
21844    pub timestamp_accuracy: MavOdidTimeAcc,
21845}
21846impl OPEN_DRONE_ID_LOCATION_DATA {
21847    pub const ENCODED_LEN: usize = 59usize;
21848    pub const DEFAULT: Self = Self {
21849        latitude: 0_i32,
21850        longitude: 0_i32,
21851        altitude_barometric: 0.0_f32,
21852        altitude_geodetic: 0.0_f32,
21853        height: 0.0_f32,
21854        timestamp: 0.0_f32,
21855        direction: 0_u16,
21856        speed_horizontal: 0_u16,
21857        speed_vertical: 0_i16,
21858        target_system: 0_u8,
21859        target_component: 0_u8,
21860        id_or_mac: [0_u8; 20usize],
21861        status: MavOdidStatus::DEFAULT,
21862        height_reference: MavOdidHeightRef::DEFAULT,
21863        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
21864        vertical_accuracy: MavOdidVerAcc::DEFAULT,
21865        barometer_accuracy: MavOdidVerAcc::DEFAULT,
21866        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
21867        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
21868    };
21869    #[cfg(feature = "arbitrary")]
21870    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21871        use arbitrary::{Arbitrary, Unstructured};
21872        let mut buf = [0u8; 1024];
21873        rng.fill_bytes(&mut buf);
21874        let mut unstructured = Unstructured::new(&buf);
21875        Self::arbitrary(&mut unstructured).unwrap_or_default()
21876    }
21877}
21878impl Default for OPEN_DRONE_ID_LOCATION_DATA {
21879    fn default() -> Self {
21880        Self::DEFAULT.clone()
21881    }
21882}
21883impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
21884    type Message = MavMessage;
21885    const ID: u32 = 12901u32;
21886    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
21887    const EXTRA_CRC: u8 = 254u8;
21888    const ENCODED_LEN: usize = 59usize;
21889    fn deser(
21890        _version: MavlinkVersion,
21891        __input: &[u8],
21892    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21893        let avail_len = __input.len();
21894        let mut payload_buf = [0; Self::ENCODED_LEN];
21895        let mut buf = if avail_len < Self::ENCODED_LEN {
21896            payload_buf[0..avail_len].copy_from_slice(__input);
21897            Bytes::new(&payload_buf)
21898        } else {
21899            Bytes::new(__input)
21900        };
21901        let mut __struct = Self::default();
21902        __struct.latitude = buf.get_i32_le()?;
21903        __struct.longitude = buf.get_i32_le()?;
21904        __struct.altitude_barometric = buf.get_f32_le()?;
21905        __struct.altitude_geodetic = buf.get_f32_le()?;
21906        __struct.height = buf.get_f32_le()?;
21907        __struct.timestamp = buf.get_f32_le()?;
21908        __struct.direction = buf.get_u16_le()?;
21909        __struct.speed_horizontal = buf.get_u16_le()?;
21910        __struct.speed_vertical = buf.get_i16_le()?;
21911        __struct.target_system = buf.get_u8()?;
21912        __struct.target_component = buf.get_u8()?;
21913        for v in &mut __struct.id_or_mac {
21914            let val = buf.get_u8()?;
21915            *v = val;
21916        }
21917        let tmp = buf.get_u8()?;
21918        __struct.status =
21919            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21920                enum_type: "MavOdidStatus",
21921                value: tmp as u64,
21922            })?;
21923        let tmp = buf.get_u8()?;
21924        __struct.height_reference =
21925            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21926                enum_type: "MavOdidHeightRef",
21927                value: tmp as u64,
21928            })?;
21929        let tmp = buf.get_u8()?;
21930        __struct.horizontal_accuracy =
21931            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21932                enum_type: "MavOdidHorAcc",
21933                value: tmp as u64,
21934            })?;
21935        let tmp = buf.get_u8()?;
21936        __struct.vertical_accuracy =
21937            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21938                enum_type: "MavOdidVerAcc",
21939                value: tmp as u64,
21940            })?;
21941        let tmp = buf.get_u8()?;
21942        __struct.barometer_accuracy =
21943            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21944                enum_type: "MavOdidVerAcc",
21945                value: tmp as u64,
21946            })?;
21947        let tmp = buf.get_u8()?;
21948        __struct.speed_accuracy =
21949            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21950                enum_type: "MavOdidSpeedAcc",
21951                value: tmp as u64,
21952            })?;
21953        let tmp = buf.get_u8()?;
21954        __struct.timestamp_accuracy =
21955            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21956                enum_type: "MavOdidTimeAcc",
21957                value: tmp as u64,
21958            })?;
21959        Ok(__struct)
21960    }
21961    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21962        let mut __tmp = BytesMut::new(bytes);
21963        #[allow(clippy::absurd_extreme_comparisons)]
21964        #[allow(unused_comparisons)]
21965        if __tmp.remaining() < Self::ENCODED_LEN {
21966            panic!(
21967                "buffer is too small (need {} bytes, but got {})",
21968                Self::ENCODED_LEN,
21969                __tmp.remaining(),
21970            )
21971        }
21972        __tmp.put_i32_le(self.latitude);
21973        __tmp.put_i32_le(self.longitude);
21974        __tmp.put_f32_le(self.altitude_barometric);
21975        __tmp.put_f32_le(self.altitude_geodetic);
21976        __tmp.put_f32_le(self.height);
21977        __tmp.put_f32_le(self.timestamp);
21978        __tmp.put_u16_le(self.direction);
21979        __tmp.put_u16_le(self.speed_horizontal);
21980        __tmp.put_i16_le(self.speed_vertical);
21981        __tmp.put_u8(self.target_system);
21982        __tmp.put_u8(self.target_component);
21983        for val in &self.id_or_mac {
21984            __tmp.put_u8(*val);
21985        }
21986        __tmp.put_u8(self.status as u8);
21987        __tmp.put_u8(self.height_reference as u8);
21988        __tmp.put_u8(self.horizontal_accuracy as u8);
21989        __tmp.put_u8(self.vertical_accuracy as u8);
21990        __tmp.put_u8(self.barometer_accuracy as u8);
21991        __tmp.put_u8(self.speed_accuracy as u8);
21992        __tmp.put_u8(self.timestamp_accuracy as u8);
21993        if matches!(version, MavlinkVersion::V2) {
21994            let len = __tmp.len();
21995            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21996        } else {
21997            __tmp.len()
21998        }
21999    }
22000}
22001#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22002#[doc = ""]
22003#[doc = "ID: 12915"]
22004#[derive(Debug, Clone, PartialEq)]
22005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22006#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22007#[cfg_attr(feature = "ts", derive(TS))]
22008#[cfg_attr(feature = "ts", ts(export))]
22009pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22010    #[doc = "System ID (0 for broadcast)."]
22011    pub target_system: u8,
22012    #[doc = "Component ID (0 for broadcast)."]
22013    pub target_component: u8,
22014    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22015    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22016    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22017    pub id_or_mac: [u8; 20],
22018    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22019    pub single_message_size: u8,
22020    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22021    pub msg_pack_size: u8,
22022    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22023    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22024    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22025    pub messages: [u8; 225],
22026}
22027impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22028    pub const ENCODED_LEN: usize = 249usize;
22029    pub const DEFAULT: Self = Self {
22030        target_system: 0_u8,
22031        target_component: 0_u8,
22032        id_or_mac: [0_u8; 20usize],
22033        single_message_size: 0_u8,
22034        msg_pack_size: 0_u8,
22035        messages: [0_u8; 225usize],
22036    };
22037    #[cfg(feature = "arbitrary")]
22038    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22039        use arbitrary::{Arbitrary, Unstructured};
22040        let mut buf = [0u8; 1024];
22041        rng.fill_bytes(&mut buf);
22042        let mut unstructured = Unstructured::new(&buf);
22043        Self::arbitrary(&mut unstructured).unwrap_or_default()
22044    }
22045}
22046impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22047    fn default() -> Self {
22048        Self::DEFAULT.clone()
22049    }
22050}
22051impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22052    type Message = MavMessage;
22053    const ID: u32 = 12915u32;
22054    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22055    const EXTRA_CRC: u8 = 94u8;
22056    const ENCODED_LEN: usize = 249usize;
22057    fn deser(
22058        _version: MavlinkVersion,
22059        __input: &[u8],
22060    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22061        let avail_len = __input.len();
22062        let mut payload_buf = [0; Self::ENCODED_LEN];
22063        let mut buf = if avail_len < Self::ENCODED_LEN {
22064            payload_buf[0..avail_len].copy_from_slice(__input);
22065            Bytes::new(&payload_buf)
22066        } else {
22067            Bytes::new(__input)
22068        };
22069        let mut __struct = Self::default();
22070        __struct.target_system = buf.get_u8()?;
22071        __struct.target_component = buf.get_u8()?;
22072        for v in &mut __struct.id_or_mac {
22073            let val = buf.get_u8()?;
22074            *v = val;
22075        }
22076        __struct.single_message_size = buf.get_u8()?;
22077        __struct.msg_pack_size = buf.get_u8()?;
22078        for v in &mut __struct.messages {
22079            let val = buf.get_u8()?;
22080            *v = val;
22081        }
22082        Ok(__struct)
22083    }
22084    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22085        let mut __tmp = BytesMut::new(bytes);
22086        #[allow(clippy::absurd_extreme_comparisons)]
22087        #[allow(unused_comparisons)]
22088        if __tmp.remaining() < Self::ENCODED_LEN {
22089            panic!(
22090                "buffer is too small (need {} bytes, but got {})",
22091                Self::ENCODED_LEN,
22092                __tmp.remaining(),
22093            )
22094        }
22095        __tmp.put_u8(self.target_system);
22096        __tmp.put_u8(self.target_component);
22097        for val in &self.id_or_mac {
22098            __tmp.put_u8(*val);
22099        }
22100        __tmp.put_u8(self.single_message_size);
22101        __tmp.put_u8(self.msg_pack_size);
22102        for val in &self.messages {
22103            __tmp.put_u8(*val);
22104        }
22105        if matches!(version, MavlinkVersion::V2) {
22106            let len = __tmp.len();
22107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22108        } else {
22109            __tmp.len()
22110        }
22111    }
22112}
22113#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22114#[doc = ""]
22115#[doc = "ID: 12905"]
22116#[derive(Debug, Clone, PartialEq)]
22117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22119#[cfg_attr(feature = "ts", derive(TS))]
22120#[cfg_attr(feature = "ts", ts(export))]
22121pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22122    #[doc = "System ID (0 for broadcast)."]
22123    pub target_system: u8,
22124    #[doc = "Component ID (0 for broadcast)."]
22125    pub target_component: u8,
22126    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22127    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22128    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22129    pub id_or_mac: [u8; 20],
22130    #[doc = "Indicates the type of the operator_id field."]
22131    pub operator_id_type: MavOdidOperatorIdType,
22132    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22133    #[cfg_attr(feature = "ts", ts(type = "string"))]
22134    pub operator_id: CharArray<20>,
22135}
22136impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22137    pub const ENCODED_LEN: usize = 43usize;
22138    pub const DEFAULT: Self = Self {
22139        target_system: 0_u8,
22140        target_component: 0_u8,
22141        id_or_mac: [0_u8; 20usize],
22142        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22143        operator_id: CharArray::new([0_u8; 20usize]),
22144    };
22145    #[cfg(feature = "arbitrary")]
22146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22147        use arbitrary::{Arbitrary, Unstructured};
22148        let mut buf = [0u8; 1024];
22149        rng.fill_bytes(&mut buf);
22150        let mut unstructured = Unstructured::new(&buf);
22151        Self::arbitrary(&mut unstructured).unwrap_or_default()
22152    }
22153}
22154impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22155    fn default() -> Self {
22156        Self::DEFAULT.clone()
22157    }
22158}
22159impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22160    type Message = MavMessage;
22161    const ID: u32 = 12905u32;
22162    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22163    const EXTRA_CRC: u8 = 49u8;
22164    const ENCODED_LEN: usize = 43usize;
22165    fn deser(
22166        _version: MavlinkVersion,
22167        __input: &[u8],
22168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22169        let avail_len = __input.len();
22170        let mut payload_buf = [0; Self::ENCODED_LEN];
22171        let mut buf = if avail_len < Self::ENCODED_LEN {
22172            payload_buf[0..avail_len].copy_from_slice(__input);
22173            Bytes::new(&payload_buf)
22174        } else {
22175            Bytes::new(__input)
22176        };
22177        let mut __struct = Self::default();
22178        __struct.target_system = buf.get_u8()?;
22179        __struct.target_component = buf.get_u8()?;
22180        for v in &mut __struct.id_or_mac {
22181            let val = buf.get_u8()?;
22182            *v = val;
22183        }
22184        let tmp = buf.get_u8()?;
22185        __struct.operator_id_type =
22186            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22187                enum_type: "MavOdidOperatorIdType",
22188                value: tmp as u64,
22189            })?;
22190        let mut tmp = [0_u8; 20usize];
22191        for v in &mut tmp {
22192            *v = buf.get_u8()?;
22193        }
22194        __struct.operator_id = CharArray::new(tmp);
22195        Ok(__struct)
22196    }
22197    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22198        let mut __tmp = BytesMut::new(bytes);
22199        #[allow(clippy::absurd_extreme_comparisons)]
22200        #[allow(unused_comparisons)]
22201        if __tmp.remaining() < Self::ENCODED_LEN {
22202            panic!(
22203                "buffer is too small (need {} bytes, but got {})",
22204                Self::ENCODED_LEN,
22205                __tmp.remaining(),
22206            )
22207        }
22208        __tmp.put_u8(self.target_system);
22209        __tmp.put_u8(self.target_component);
22210        for val in &self.id_or_mac {
22211            __tmp.put_u8(*val);
22212        }
22213        __tmp.put_u8(self.operator_id_type as u8);
22214        for val in &self.operator_id {
22215            __tmp.put_u8(*val);
22216        }
22217        if matches!(version, MavlinkVersion::V2) {
22218            let len = __tmp.len();
22219            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22220        } else {
22221            __tmp.len()
22222        }
22223    }
22224}
22225#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22226#[doc = ""]
22227#[doc = "ID: 12903"]
22228#[derive(Debug, Clone, PartialEq)]
22229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22231#[cfg_attr(feature = "ts", derive(TS))]
22232#[cfg_attr(feature = "ts", ts(export))]
22233pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22234    #[doc = "System ID (0 for broadcast)."]
22235    pub target_system: u8,
22236    #[doc = "Component ID (0 for broadcast)."]
22237    pub target_component: u8,
22238    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22239    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22240    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22241    pub id_or_mac: [u8; 20],
22242    #[doc = "Indicates the type of the description field."]
22243    pub description_type: MavOdidDescType,
22244    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22245    #[cfg_attr(feature = "ts", ts(type = "string"))]
22246    pub description: CharArray<23>,
22247}
22248impl OPEN_DRONE_ID_SELF_ID_DATA {
22249    pub const ENCODED_LEN: usize = 46usize;
22250    pub const DEFAULT: Self = Self {
22251        target_system: 0_u8,
22252        target_component: 0_u8,
22253        id_or_mac: [0_u8; 20usize],
22254        description_type: MavOdidDescType::DEFAULT,
22255        description: CharArray::new([0_u8; 23usize]),
22256    };
22257    #[cfg(feature = "arbitrary")]
22258    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22259        use arbitrary::{Arbitrary, Unstructured};
22260        let mut buf = [0u8; 1024];
22261        rng.fill_bytes(&mut buf);
22262        let mut unstructured = Unstructured::new(&buf);
22263        Self::arbitrary(&mut unstructured).unwrap_or_default()
22264    }
22265}
22266impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22267    fn default() -> Self {
22268        Self::DEFAULT.clone()
22269    }
22270}
22271impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22272    type Message = MavMessage;
22273    const ID: u32 = 12903u32;
22274    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22275    const EXTRA_CRC: u8 = 249u8;
22276    const ENCODED_LEN: usize = 46usize;
22277    fn deser(
22278        _version: MavlinkVersion,
22279        __input: &[u8],
22280    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22281        let avail_len = __input.len();
22282        let mut payload_buf = [0; Self::ENCODED_LEN];
22283        let mut buf = if avail_len < Self::ENCODED_LEN {
22284            payload_buf[0..avail_len].copy_from_slice(__input);
22285            Bytes::new(&payload_buf)
22286        } else {
22287            Bytes::new(__input)
22288        };
22289        let mut __struct = Self::default();
22290        __struct.target_system = buf.get_u8()?;
22291        __struct.target_component = buf.get_u8()?;
22292        for v in &mut __struct.id_or_mac {
22293            let val = buf.get_u8()?;
22294            *v = val;
22295        }
22296        let tmp = buf.get_u8()?;
22297        __struct.description_type =
22298            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22299                enum_type: "MavOdidDescType",
22300                value: tmp as u64,
22301            })?;
22302        let mut tmp = [0_u8; 23usize];
22303        for v in &mut tmp {
22304            *v = buf.get_u8()?;
22305        }
22306        __struct.description = CharArray::new(tmp);
22307        Ok(__struct)
22308    }
22309    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22310        let mut __tmp = BytesMut::new(bytes);
22311        #[allow(clippy::absurd_extreme_comparisons)]
22312        #[allow(unused_comparisons)]
22313        if __tmp.remaining() < Self::ENCODED_LEN {
22314            panic!(
22315                "buffer is too small (need {} bytes, but got {})",
22316                Self::ENCODED_LEN,
22317                __tmp.remaining(),
22318            )
22319        }
22320        __tmp.put_u8(self.target_system);
22321        __tmp.put_u8(self.target_component);
22322        for val in &self.id_or_mac {
22323            __tmp.put_u8(*val);
22324        }
22325        __tmp.put_u8(self.description_type as u8);
22326        for val in &self.description {
22327            __tmp.put_u8(*val);
22328        }
22329        if matches!(version, MavlinkVersion::V2) {
22330            let len = __tmp.len();
22331            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22332        } else {
22333            __tmp.len()
22334        }
22335    }
22336}
22337#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22338#[doc = ""]
22339#[doc = "ID: 12904"]
22340#[derive(Debug, Clone, PartialEq)]
22341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22343#[cfg_attr(feature = "ts", derive(TS))]
22344#[cfg_attr(feature = "ts", ts(export))]
22345pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22346    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22347    pub operator_latitude: i32,
22348    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22349    pub operator_longitude: i32,
22350    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22351    pub area_ceiling: f32,
22352    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22353    pub area_floor: f32,
22354    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22355    pub operator_altitude_geo: f32,
22356    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22357    pub timestamp: u32,
22358    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22359    pub area_count: u16,
22360    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22361    pub area_radius: u16,
22362    #[doc = "System ID (0 for broadcast)."]
22363    pub target_system: u8,
22364    #[doc = "Component ID (0 for broadcast)."]
22365    pub target_component: u8,
22366    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22367    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22368    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22369    pub id_or_mac: [u8; 20],
22370    #[doc = "Specifies the operator location type."]
22371    pub operator_location_type: MavOdidOperatorLocationType,
22372    #[doc = "Specifies the classification type of the UA."]
22373    pub classification_type: MavOdidClassificationType,
22374    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22375    pub category_eu: MavOdidCategoryEu,
22376    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22377    pub class_eu: MavOdidClassEu,
22378}
22379impl OPEN_DRONE_ID_SYSTEM_DATA {
22380    pub const ENCODED_LEN: usize = 54usize;
22381    pub const DEFAULT: Self = Self {
22382        operator_latitude: 0_i32,
22383        operator_longitude: 0_i32,
22384        area_ceiling: 0.0_f32,
22385        area_floor: 0.0_f32,
22386        operator_altitude_geo: 0.0_f32,
22387        timestamp: 0_u32,
22388        area_count: 0_u16,
22389        area_radius: 0_u16,
22390        target_system: 0_u8,
22391        target_component: 0_u8,
22392        id_or_mac: [0_u8; 20usize],
22393        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22394        classification_type: MavOdidClassificationType::DEFAULT,
22395        category_eu: MavOdidCategoryEu::DEFAULT,
22396        class_eu: MavOdidClassEu::DEFAULT,
22397    };
22398    #[cfg(feature = "arbitrary")]
22399    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22400        use arbitrary::{Arbitrary, Unstructured};
22401        let mut buf = [0u8; 1024];
22402        rng.fill_bytes(&mut buf);
22403        let mut unstructured = Unstructured::new(&buf);
22404        Self::arbitrary(&mut unstructured).unwrap_or_default()
22405    }
22406}
22407impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22408    fn default() -> Self {
22409        Self::DEFAULT.clone()
22410    }
22411}
22412impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22413    type Message = MavMessage;
22414    const ID: u32 = 12904u32;
22415    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22416    const EXTRA_CRC: u8 = 77u8;
22417    const ENCODED_LEN: usize = 54usize;
22418    fn deser(
22419        _version: MavlinkVersion,
22420        __input: &[u8],
22421    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22422        let avail_len = __input.len();
22423        let mut payload_buf = [0; Self::ENCODED_LEN];
22424        let mut buf = if avail_len < Self::ENCODED_LEN {
22425            payload_buf[0..avail_len].copy_from_slice(__input);
22426            Bytes::new(&payload_buf)
22427        } else {
22428            Bytes::new(__input)
22429        };
22430        let mut __struct = Self::default();
22431        __struct.operator_latitude = buf.get_i32_le()?;
22432        __struct.operator_longitude = buf.get_i32_le()?;
22433        __struct.area_ceiling = buf.get_f32_le()?;
22434        __struct.area_floor = buf.get_f32_le()?;
22435        __struct.operator_altitude_geo = buf.get_f32_le()?;
22436        __struct.timestamp = buf.get_u32_le()?;
22437        __struct.area_count = buf.get_u16_le()?;
22438        __struct.area_radius = buf.get_u16_le()?;
22439        __struct.target_system = buf.get_u8()?;
22440        __struct.target_component = buf.get_u8()?;
22441        for v in &mut __struct.id_or_mac {
22442            let val = buf.get_u8()?;
22443            *v = val;
22444        }
22445        let tmp = buf.get_u8()?;
22446        __struct.operator_location_type =
22447            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22448                enum_type: "MavOdidOperatorLocationType",
22449                value: tmp as u64,
22450            })?;
22451        let tmp = buf.get_u8()?;
22452        __struct.classification_type =
22453            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22454                enum_type: "MavOdidClassificationType",
22455                value: tmp as u64,
22456            })?;
22457        let tmp = buf.get_u8()?;
22458        __struct.category_eu =
22459            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22460                enum_type: "MavOdidCategoryEu",
22461                value: tmp as u64,
22462            })?;
22463        let tmp = buf.get_u8()?;
22464        __struct.class_eu =
22465            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22466                enum_type: "MavOdidClassEu",
22467                value: tmp as u64,
22468            })?;
22469        Ok(__struct)
22470    }
22471    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22472        let mut __tmp = BytesMut::new(bytes);
22473        #[allow(clippy::absurd_extreme_comparisons)]
22474        #[allow(unused_comparisons)]
22475        if __tmp.remaining() < Self::ENCODED_LEN {
22476            panic!(
22477                "buffer is too small (need {} bytes, but got {})",
22478                Self::ENCODED_LEN,
22479                __tmp.remaining(),
22480            )
22481        }
22482        __tmp.put_i32_le(self.operator_latitude);
22483        __tmp.put_i32_le(self.operator_longitude);
22484        __tmp.put_f32_le(self.area_ceiling);
22485        __tmp.put_f32_le(self.area_floor);
22486        __tmp.put_f32_le(self.operator_altitude_geo);
22487        __tmp.put_u32_le(self.timestamp);
22488        __tmp.put_u16_le(self.area_count);
22489        __tmp.put_u16_le(self.area_radius);
22490        __tmp.put_u8(self.target_system);
22491        __tmp.put_u8(self.target_component);
22492        for val in &self.id_or_mac {
22493            __tmp.put_u8(*val);
22494        }
22495        __tmp.put_u8(self.operator_location_type as u8);
22496        __tmp.put_u8(self.classification_type as u8);
22497        __tmp.put_u8(self.category_eu as u8);
22498        __tmp.put_u8(self.class_eu as u8);
22499        if matches!(version, MavlinkVersion::V2) {
22500            let len = __tmp.len();
22501            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22502        } else {
22503            __tmp.len()
22504        }
22505    }
22506}
22507#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22508#[doc = ""]
22509#[doc = "ID: 12919"]
22510#[derive(Debug, Clone, PartialEq)]
22511#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22512#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22513#[cfg_attr(feature = "ts", derive(TS))]
22514#[cfg_attr(feature = "ts", ts(export))]
22515pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22516    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22517    pub operator_latitude: i32,
22518    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22519    pub operator_longitude: i32,
22520    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22521    pub operator_altitude_geo: f32,
22522    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22523    pub timestamp: u32,
22524    #[doc = "System ID (0 for broadcast)."]
22525    pub target_system: u8,
22526    #[doc = "Component ID (0 for broadcast)."]
22527    pub target_component: u8,
22528}
22529impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22530    pub const ENCODED_LEN: usize = 18usize;
22531    pub const DEFAULT: Self = Self {
22532        operator_latitude: 0_i32,
22533        operator_longitude: 0_i32,
22534        operator_altitude_geo: 0.0_f32,
22535        timestamp: 0_u32,
22536        target_system: 0_u8,
22537        target_component: 0_u8,
22538    };
22539    #[cfg(feature = "arbitrary")]
22540    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22541        use arbitrary::{Arbitrary, Unstructured};
22542        let mut buf = [0u8; 1024];
22543        rng.fill_bytes(&mut buf);
22544        let mut unstructured = Unstructured::new(&buf);
22545        Self::arbitrary(&mut unstructured).unwrap_or_default()
22546    }
22547}
22548impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22549    fn default() -> Self {
22550        Self::DEFAULT.clone()
22551    }
22552}
22553impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22554    type Message = MavMessage;
22555    const ID: u32 = 12919u32;
22556    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22557    const EXTRA_CRC: u8 = 7u8;
22558    const ENCODED_LEN: usize = 18usize;
22559    fn deser(
22560        _version: MavlinkVersion,
22561        __input: &[u8],
22562    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22563        let avail_len = __input.len();
22564        let mut payload_buf = [0; Self::ENCODED_LEN];
22565        let mut buf = if avail_len < Self::ENCODED_LEN {
22566            payload_buf[0..avail_len].copy_from_slice(__input);
22567            Bytes::new(&payload_buf)
22568        } else {
22569            Bytes::new(__input)
22570        };
22571        let mut __struct = Self::default();
22572        __struct.operator_latitude = buf.get_i32_le()?;
22573        __struct.operator_longitude = buf.get_i32_le()?;
22574        __struct.operator_altitude_geo = buf.get_f32_le()?;
22575        __struct.timestamp = buf.get_u32_le()?;
22576        __struct.target_system = buf.get_u8()?;
22577        __struct.target_component = buf.get_u8()?;
22578        Ok(__struct)
22579    }
22580    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22581        let mut __tmp = BytesMut::new(bytes);
22582        #[allow(clippy::absurd_extreme_comparisons)]
22583        #[allow(unused_comparisons)]
22584        if __tmp.remaining() < Self::ENCODED_LEN {
22585            panic!(
22586                "buffer is too small (need {} bytes, but got {})",
22587                Self::ENCODED_LEN,
22588                __tmp.remaining(),
22589            )
22590        }
22591        __tmp.put_i32_le(self.operator_latitude);
22592        __tmp.put_i32_le(self.operator_longitude);
22593        __tmp.put_f32_le(self.operator_altitude_geo);
22594        __tmp.put_u32_le(self.timestamp);
22595        __tmp.put_u8(self.target_system);
22596        __tmp.put_u8(self.target_component);
22597        if matches!(version, MavlinkVersion::V2) {
22598            let len = __tmp.len();
22599            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22600        } else {
22601            __tmp.len()
22602        }
22603    }
22604}
22605#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22606#[doc = ""]
22607#[doc = "ID: 100"]
22608#[derive(Debug, Clone, PartialEq)]
22609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22611#[cfg_attr(feature = "ts", derive(TS))]
22612#[cfg_attr(feature = "ts", ts(export))]
22613pub struct OPTICAL_FLOW_DATA {
22614    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22615    pub time_usec: u64,
22616    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22617    pub flow_comp_m_x: f32,
22618    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22619    pub flow_comp_m_y: f32,
22620    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22621    pub ground_distance: f32,
22622    #[doc = "Flow in x-sensor direction"]
22623    pub flow_x: i16,
22624    #[doc = "Flow in y-sensor direction"]
22625    pub flow_y: i16,
22626    #[doc = "Sensor ID"]
22627    pub sensor_id: u8,
22628    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22629    pub quality: u8,
22630    #[doc = "Flow rate about X axis"]
22631    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22632    pub flow_rate_x: f32,
22633    #[doc = "Flow rate about Y axis"]
22634    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22635    pub flow_rate_y: f32,
22636}
22637impl OPTICAL_FLOW_DATA {
22638    pub const ENCODED_LEN: usize = 34usize;
22639    pub const DEFAULT: Self = Self {
22640        time_usec: 0_u64,
22641        flow_comp_m_x: 0.0_f32,
22642        flow_comp_m_y: 0.0_f32,
22643        ground_distance: 0.0_f32,
22644        flow_x: 0_i16,
22645        flow_y: 0_i16,
22646        sensor_id: 0_u8,
22647        quality: 0_u8,
22648        flow_rate_x: 0.0_f32,
22649        flow_rate_y: 0.0_f32,
22650    };
22651    #[cfg(feature = "arbitrary")]
22652    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22653        use arbitrary::{Arbitrary, Unstructured};
22654        let mut buf = [0u8; 1024];
22655        rng.fill_bytes(&mut buf);
22656        let mut unstructured = Unstructured::new(&buf);
22657        Self::arbitrary(&mut unstructured).unwrap_or_default()
22658    }
22659}
22660impl Default for OPTICAL_FLOW_DATA {
22661    fn default() -> Self {
22662        Self::DEFAULT.clone()
22663    }
22664}
22665impl MessageData for OPTICAL_FLOW_DATA {
22666    type Message = MavMessage;
22667    const ID: u32 = 100u32;
22668    const NAME: &'static str = "OPTICAL_FLOW";
22669    const EXTRA_CRC: u8 = 175u8;
22670    const ENCODED_LEN: usize = 34usize;
22671    fn deser(
22672        _version: MavlinkVersion,
22673        __input: &[u8],
22674    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22675        let avail_len = __input.len();
22676        let mut payload_buf = [0; Self::ENCODED_LEN];
22677        let mut buf = if avail_len < Self::ENCODED_LEN {
22678            payload_buf[0..avail_len].copy_from_slice(__input);
22679            Bytes::new(&payload_buf)
22680        } else {
22681            Bytes::new(__input)
22682        };
22683        let mut __struct = Self::default();
22684        __struct.time_usec = buf.get_u64_le()?;
22685        __struct.flow_comp_m_x = buf.get_f32_le()?;
22686        __struct.flow_comp_m_y = buf.get_f32_le()?;
22687        __struct.ground_distance = buf.get_f32_le()?;
22688        __struct.flow_x = buf.get_i16_le()?;
22689        __struct.flow_y = buf.get_i16_le()?;
22690        __struct.sensor_id = buf.get_u8()?;
22691        __struct.quality = buf.get_u8()?;
22692        __struct.flow_rate_x = buf.get_f32_le()?;
22693        __struct.flow_rate_y = buf.get_f32_le()?;
22694        Ok(__struct)
22695    }
22696    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22697        let mut __tmp = BytesMut::new(bytes);
22698        #[allow(clippy::absurd_extreme_comparisons)]
22699        #[allow(unused_comparisons)]
22700        if __tmp.remaining() < Self::ENCODED_LEN {
22701            panic!(
22702                "buffer is too small (need {} bytes, but got {})",
22703                Self::ENCODED_LEN,
22704                __tmp.remaining(),
22705            )
22706        }
22707        __tmp.put_u64_le(self.time_usec);
22708        __tmp.put_f32_le(self.flow_comp_m_x);
22709        __tmp.put_f32_le(self.flow_comp_m_y);
22710        __tmp.put_f32_le(self.ground_distance);
22711        __tmp.put_i16_le(self.flow_x);
22712        __tmp.put_i16_le(self.flow_y);
22713        __tmp.put_u8(self.sensor_id);
22714        __tmp.put_u8(self.quality);
22715        if matches!(version, MavlinkVersion::V2) {
22716            __tmp.put_f32_le(self.flow_rate_x);
22717            __tmp.put_f32_le(self.flow_rate_y);
22718            let len = __tmp.len();
22719            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22720        } else {
22721            __tmp.len()
22722        }
22723    }
22724}
22725#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22726#[doc = ""]
22727#[doc = "ID: 106"]
22728#[derive(Debug, Clone, PartialEq)]
22729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22731#[cfg_attr(feature = "ts", derive(TS))]
22732#[cfg_attr(feature = "ts", ts(export))]
22733pub struct OPTICAL_FLOW_RAD_DATA {
22734    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22735    pub time_usec: u64,
22736    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22737    pub integration_time_us: u32,
22738    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22739    pub integrated_x: f32,
22740    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22741    pub integrated_y: f32,
22742    #[doc = "RH rotation around X axis"]
22743    pub integrated_xgyro: f32,
22744    #[doc = "RH rotation around Y axis"]
22745    pub integrated_ygyro: f32,
22746    #[doc = "RH rotation around Z axis"]
22747    pub integrated_zgyro: f32,
22748    #[doc = "Time since the distance was sampled."]
22749    pub time_delta_distance_us: u32,
22750    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22751    pub distance: f32,
22752    #[doc = "Temperature"]
22753    pub temperature: i16,
22754    #[doc = "Sensor ID"]
22755    pub sensor_id: u8,
22756    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22757    pub quality: u8,
22758}
22759impl OPTICAL_FLOW_RAD_DATA {
22760    pub const ENCODED_LEN: usize = 44usize;
22761    pub const DEFAULT: Self = Self {
22762        time_usec: 0_u64,
22763        integration_time_us: 0_u32,
22764        integrated_x: 0.0_f32,
22765        integrated_y: 0.0_f32,
22766        integrated_xgyro: 0.0_f32,
22767        integrated_ygyro: 0.0_f32,
22768        integrated_zgyro: 0.0_f32,
22769        time_delta_distance_us: 0_u32,
22770        distance: 0.0_f32,
22771        temperature: 0_i16,
22772        sensor_id: 0_u8,
22773        quality: 0_u8,
22774    };
22775    #[cfg(feature = "arbitrary")]
22776    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22777        use arbitrary::{Arbitrary, Unstructured};
22778        let mut buf = [0u8; 1024];
22779        rng.fill_bytes(&mut buf);
22780        let mut unstructured = Unstructured::new(&buf);
22781        Self::arbitrary(&mut unstructured).unwrap_or_default()
22782    }
22783}
22784impl Default for OPTICAL_FLOW_RAD_DATA {
22785    fn default() -> Self {
22786        Self::DEFAULT.clone()
22787    }
22788}
22789impl MessageData for OPTICAL_FLOW_RAD_DATA {
22790    type Message = MavMessage;
22791    const ID: u32 = 106u32;
22792    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22793    const EXTRA_CRC: u8 = 138u8;
22794    const ENCODED_LEN: usize = 44usize;
22795    fn deser(
22796        _version: MavlinkVersion,
22797        __input: &[u8],
22798    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22799        let avail_len = __input.len();
22800        let mut payload_buf = [0; Self::ENCODED_LEN];
22801        let mut buf = if avail_len < Self::ENCODED_LEN {
22802            payload_buf[0..avail_len].copy_from_slice(__input);
22803            Bytes::new(&payload_buf)
22804        } else {
22805            Bytes::new(__input)
22806        };
22807        let mut __struct = Self::default();
22808        __struct.time_usec = buf.get_u64_le()?;
22809        __struct.integration_time_us = buf.get_u32_le()?;
22810        __struct.integrated_x = buf.get_f32_le()?;
22811        __struct.integrated_y = buf.get_f32_le()?;
22812        __struct.integrated_xgyro = buf.get_f32_le()?;
22813        __struct.integrated_ygyro = buf.get_f32_le()?;
22814        __struct.integrated_zgyro = buf.get_f32_le()?;
22815        __struct.time_delta_distance_us = buf.get_u32_le()?;
22816        __struct.distance = buf.get_f32_le()?;
22817        __struct.temperature = buf.get_i16_le()?;
22818        __struct.sensor_id = buf.get_u8()?;
22819        __struct.quality = buf.get_u8()?;
22820        Ok(__struct)
22821    }
22822    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22823        let mut __tmp = BytesMut::new(bytes);
22824        #[allow(clippy::absurd_extreme_comparisons)]
22825        #[allow(unused_comparisons)]
22826        if __tmp.remaining() < Self::ENCODED_LEN {
22827            panic!(
22828                "buffer is too small (need {} bytes, but got {})",
22829                Self::ENCODED_LEN,
22830                __tmp.remaining(),
22831            )
22832        }
22833        __tmp.put_u64_le(self.time_usec);
22834        __tmp.put_u32_le(self.integration_time_us);
22835        __tmp.put_f32_le(self.integrated_x);
22836        __tmp.put_f32_le(self.integrated_y);
22837        __tmp.put_f32_le(self.integrated_xgyro);
22838        __tmp.put_f32_le(self.integrated_ygyro);
22839        __tmp.put_f32_le(self.integrated_zgyro);
22840        __tmp.put_u32_le(self.time_delta_distance_us);
22841        __tmp.put_f32_le(self.distance);
22842        __tmp.put_i16_le(self.temperature);
22843        __tmp.put_u8(self.sensor_id);
22844        __tmp.put_u8(self.quality);
22845        if matches!(version, MavlinkVersion::V2) {
22846            let len = __tmp.len();
22847            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22848        } else {
22849            __tmp.len()
22850        }
22851    }
22852}
22853#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
22854#[doc = ""]
22855#[doc = "ID: 360"]
22856#[derive(Debug, Clone, PartialEq)]
22857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22859#[cfg_attr(feature = "ts", derive(TS))]
22860#[cfg_attr(feature = "ts", ts(export))]
22861pub struct ORBIT_EXECUTION_STATUS_DATA {
22862    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22863    pub time_usec: u64,
22864    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
22865    pub radius: f32,
22866    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22867    pub x: i32,
22868    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22869    pub y: i32,
22870    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
22871    pub z: f32,
22872    #[doc = "The coordinate system of the fields: x, y, z."]
22873    pub frame: MavFrame,
22874}
22875impl ORBIT_EXECUTION_STATUS_DATA {
22876    pub const ENCODED_LEN: usize = 25usize;
22877    pub const DEFAULT: Self = Self {
22878        time_usec: 0_u64,
22879        radius: 0.0_f32,
22880        x: 0_i32,
22881        y: 0_i32,
22882        z: 0.0_f32,
22883        frame: MavFrame::DEFAULT,
22884    };
22885    #[cfg(feature = "arbitrary")]
22886    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22887        use arbitrary::{Arbitrary, Unstructured};
22888        let mut buf = [0u8; 1024];
22889        rng.fill_bytes(&mut buf);
22890        let mut unstructured = Unstructured::new(&buf);
22891        Self::arbitrary(&mut unstructured).unwrap_or_default()
22892    }
22893}
22894impl Default for ORBIT_EXECUTION_STATUS_DATA {
22895    fn default() -> Self {
22896        Self::DEFAULT.clone()
22897    }
22898}
22899impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
22900    type Message = MavMessage;
22901    const ID: u32 = 360u32;
22902    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
22903    const EXTRA_CRC: u8 = 11u8;
22904    const ENCODED_LEN: usize = 25usize;
22905    fn deser(
22906        _version: MavlinkVersion,
22907        __input: &[u8],
22908    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22909        let avail_len = __input.len();
22910        let mut payload_buf = [0; Self::ENCODED_LEN];
22911        let mut buf = if avail_len < Self::ENCODED_LEN {
22912            payload_buf[0..avail_len].copy_from_slice(__input);
22913            Bytes::new(&payload_buf)
22914        } else {
22915            Bytes::new(__input)
22916        };
22917        let mut __struct = Self::default();
22918        __struct.time_usec = buf.get_u64_le()?;
22919        __struct.radius = buf.get_f32_le()?;
22920        __struct.x = buf.get_i32_le()?;
22921        __struct.y = buf.get_i32_le()?;
22922        __struct.z = buf.get_f32_le()?;
22923        let tmp = buf.get_u8()?;
22924        __struct.frame =
22925            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22926                enum_type: "MavFrame",
22927                value: tmp as u64,
22928            })?;
22929        Ok(__struct)
22930    }
22931    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22932        let mut __tmp = BytesMut::new(bytes);
22933        #[allow(clippy::absurd_extreme_comparisons)]
22934        #[allow(unused_comparisons)]
22935        if __tmp.remaining() < Self::ENCODED_LEN {
22936            panic!(
22937                "buffer is too small (need {} bytes, but got {})",
22938                Self::ENCODED_LEN,
22939                __tmp.remaining(),
22940            )
22941        }
22942        __tmp.put_u64_le(self.time_usec);
22943        __tmp.put_f32_le(self.radius);
22944        __tmp.put_i32_le(self.x);
22945        __tmp.put_i32_le(self.y);
22946        __tmp.put_f32_le(self.z);
22947        __tmp.put_u8(self.frame as u8);
22948        if matches!(version, MavlinkVersion::V2) {
22949            let len = __tmp.len();
22950            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22951        } else {
22952            __tmp.len()
22953        }
22954    }
22955}
22956#[doc = "Response from a PARAM_EXT_SET message."]
22957#[doc = ""]
22958#[doc = "ID: 324"]
22959#[derive(Debug, Clone, PartialEq)]
22960#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22961#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22962#[cfg_attr(feature = "ts", derive(TS))]
22963#[cfg_attr(feature = "ts", ts(export))]
22964pub struct PARAM_EXT_ACK_DATA {
22965    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22966    #[cfg_attr(feature = "ts", ts(type = "string"))]
22967    pub param_id: CharArray<16>,
22968    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
22969    #[cfg_attr(feature = "ts", ts(type = "string"))]
22970    pub param_value: CharArray<128>,
22971    #[doc = "Parameter type."]
22972    pub param_type: MavParamExtType,
22973    #[doc = "Result code."]
22974    pub param_result: ParamAck,
22975}
22976impl PARAM_EXT_ACK_DATA {
22977    pub const ENCODED_LEN: usize = 146usize;
22978    pub const DEFAULT: Self = Self {
22979        param_id: CharArray::new([0_u8; 16usize]),
22980        param_value: CharArray::new([0_u8; 128usize]),
22981        param_type: MavParamExtType::DEFAULT,
22982        param_result: ParamAck::DEFAULT,
22983    };
22984    #[cfg(feature = "arbitrary")]
22985    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22986        use arbitrary::{Arbitrary, Unstructured};
22987        let mut buf = [0u8; 1024];
22988        rng.fill_bytes(&mut buf);
22989        let mut unstructured = Unstructured::new(&buf);
22990        Self::arbitrary(&mut unstructured).unwrap_or_default()
22991    }
22992}
22993impl Default for PARAM_EXT_ACK_DATA {
22994    fn default() -> Self {
22995        Self::DEFAULT.clone()
22996    }
22997}
22998impl MessageData for PARAM_EXT_ACK_DATA {
22999    type Message = MavMessage;
23000    const ID: u32 = 324u32;
23001    const NAME: &'static str = "PARAM_EXT_ACK";
23002    const EXTRA_CRC: u8 = 132u8;
23003    const ENCODED_LEN: usize = 146usize;
23004    fn deser(
23005        _version: MavlinkVersion,
23006        __input: &[u8],
23007    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23008        let avail_len = __input.len();
23009        let mut payload_buf = [0; Self::ENCODED_LEN];
23010        let mut buf = if avail_len < Self::ENCODED_LEN {
23011            payload_buf[0..avail_len].copy_from_slice(__input);
23012            Bytes::new(&payload_buf)
23013        } else {
23014            Bytes::new(__input)
23015        };
23016        let mut __struct = Self::default();
23017        let mut tmp = [0_u8; 16usize];
23018        for v in &mut tmp {
23019            *v = buf.get_u8()?;
23020        }
23021        __struct.param_id = CharArray::new(tmp);
23022        let mut tmp = [0_u8; 128usize];
23023        for v in &mut tmp {
23024            *v = buf.get_u8()?;
23025        }
23026        __struct.param_value = CharArray::new(tmp);
23027        let tmp = buf.get_u8()?;
23028        __struct.param_type =
23029            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23030                enum_type: "MavParamExtType",
23031                value: tmp as u64,
23032            })?;
23033        let tmp = buf.get_u8()?;
23034        __struct.param_result =
23035            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23036                enum_type: "ParamAck",
23037                value: tmp as u64,
23038            })?;
23039        Ok(__struct)
23040    }
23041    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23042        let mut __tmp = BytesMut::new(bytes);
23043        #[allow(clippy::absurd_extreme_comparisons)]
23044        #[allow(unused_comparisons)]
23045        if __tmp.remaining() < Self::ENCODED_LEN {
23046            panic!(
23047                "buffer is too small (need {} bytes, but got {})",
23048                Self::ENCODED_LEN,
23049                __tmp.remaining(),
23050            )
23051        }
23052        for val in &self.param_id {
23053            __tmp.put_u8(*val);
23054        }
23055        for val in &self.param_value {
23056            __tmp.put_u8(*val);
23057        }
23058        __tmp.put_u8(self.param_type as u8);
23059        __tmp.put_u8(self.param_result as u8);
23060        if matches!(version, MavlinkVersion::V2) {
23061            let len = __tmp.len();
23062            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23063        } else {
23064            __tmp.len()
23065        }
23066    }
23067}
23068#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23069#[doc = ""]
23070#[doc = "ID: 321"]
23071#[derive(Debug, Clone, PartialEq)]
23072#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23073#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23074#[cfg_attr(feature = "ts", derive(TS))]
23075#[cfg_attr(feature = "ts", ts(export))]
23076pub struct PARAM_EXT_REQUEST_LIST_DATA {
23077    #[doc = "System ID"]
23078    pub target_system: u8,
23079    #[doc = "Component ID"]
23080    pub target_component: u8,
23081}
23082impl PARAM_EXT_REQUEST_LIST_DATA {
23083    pub const ENCODED_LEN: usize = 2usize;
23084    pub const DEFAULT: Self = Self {
23085        target_system: 0_u8,
23086        target_component: 0_u8,
23087    };
23088    #[cfg(feature = "arbitrary")]
23089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23090        use arbitrary::{Arbitrary, Unstructured};
23091        let mut buf = [0u8; 1024];
23092        rng.fill_bytes(&mut buf);
23093        let mut unstructured = Unstructured::new(&buf);
23094        Self::arbitrary(&mut unstructured).unwrap_or_default()
23095    }
23096}
23097impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23098    fn default() -> Self {
23099        Self::DEFAULT.clone()
23100    }
23101}
23102impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23103    type Message = MavMessage;
23104    const ID: u32 = 321u32;
23105    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23106    const EXTRA_CRC: u8 = 88u8;
23107    const ENCODED_LEN: usize = 2usize;
23108    fn deser(
23109        _version: MavlinkVersion,
23110        __input: &[u8],
23111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23112        let avail_len = __input.len();
23113        let mut payload_buf = [0; Self::ENCODED_LEN];
23114        let mut buf = if avail_len < Self::ENCODED_LEN {
23115            payload_buf[0..avail_len].copy_from_slice(__input);
23116            Bytes::new(&payload_buf)
23117        } else {
23118            Bytes::new(__input)
23119        };
23120        let mut __struct = Self::default();
23121        __struct.target_system = buf.get_u8()?;
23122        __struct.target_component = buf.get_u8()?;
23123        Ok(__struct)
23124    }
23125    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23126        let mut __tmp = BytesMut::new(bytes);
23127        #[allow(clippy::absurd_extreme_comparisons)]
23128        #[allow(unused_comparisons)]
23129        if __tmp.remaining() < Self::ENCODED_LEN {
23130            panic!(
23131                "buffer is too small (need {} bytes, but got {})",
23132                Self::ENCODED_LEN,
23133                __tmp.remaining(),
23134            )
23135        }
23136        __tmp.put_u8(self.target_system);
23137        __tmp.put_u8(self.target_component);
23138        if matches!(version, MavlinkVersion::V2) {
23139            let len = __tmp.len();
23140            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23141        } else {
23142            __tmp.len()
23143        }
23144    }
23145}
23146#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23147#[doc = ""]
23148#[doc = "ID: 320"]
23149#[derive(Debug, Clone, PartialEq)]
23150#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23151#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23152#[cfg_attr(feature = "ts", derive(TS))]
23153#[cfg_attr(feature = "ts", ts(export))]
23154pub struct PARAM_EXT_REQUEST_READ_DATA {
23155    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23156    pub param_index: i16,
23157    #[doc = "System ID"]
23158    pub target_system: u8,
23159    #[doc = "Component ID"]
23160    pub target_component: u8,
23161    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23162    #[cfg_attr(feature = "ts", ts(type = "string"))]
23163    pub param_id: CharArray<16>,
23164}
23165impl PARAM_EXT_REQUEST_READ_DATA {
23166    pub const ENCODED_LEN: usize = 20usize;
23167    pub const DEFAULT: Self = Self {
23168        param_index: 0_i16,
23169        target_system: 0_u8,
23170        target_component: 0_u8,
23171        param_id: CharArray::new([0_u8; 16usize]),
23172    };
23173    #[cfg(feature = "arbitrary")]
23174    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23175        use arbitrary::{Arbitrary, Unstructured};
23176        let mut buf = [0u8; 1024];
23177        rng.fill_bytes(&mut buf);
23178        let mut unstructured = Unstructured::new(&buf);
23179        Self::arbitrary(&mut unstructured).unwrap_or_default()
23180    }
23181}
23182impl Default for PARAM_EXT_REQUEST_READ_DATA {
23183    fn default() -> Self {
23184        Self::DEFAULT.clone()
23185    }
23186}
23187impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23188    type Message = MavMessage;
23189    const ID: u32 = 320u32;
23190    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23191    const EXTRA_CRC: u8 = 243u8;
23192    const ENCODED_LEN: usize = 20usize;
23193    fn deser(
23194        _version: MavlinkVersion,
23195        __input: &[u8],
23196    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23197        let avail_len = __input.len();
23198        let mut payload_buf = [0; Self::ENCODED_LEN];
23199        let mut buf = if avail_len < Self::ENCODED_LEN {
23200            payload_buf[0..avail_len].copy_from_slice(__input);
23201            Bytes::new(&payload_buf)
23202        } else {
23203            Bytes::new(__input)
23204        };
23205        let mut __struct = Self::default();
23206        __struct.param_index = buf.get_i16_le()?;
23207        __struct.target_system = buf.get_u8()?;
23208        __struct.target_component = buf.get_u8()?;
23209        let mut tmp = [0_u8; 16usize];
23210        for v in &mut tmp {
23211            *v = buf.get_u8()?;
23212        }
23213        __struct.param_id = CharArray::new(tmp);
23214        Ok(__struct)
23215    }
23216    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23217        let mut __tmp = BytesMut::new(bytes);
23218        #[allow(clippy::absurd_extreme_comparisons)]
23219        #[allow(unused_comparisons)]
23220        if __tmp.remaining() < Self::ENCODED_LEN {
23221            panic!(
23222                "buffer is too small (need {} bytes, but got {})",
23223                Self::ENCODED_LEN,
23224                __tmp.remaining(),
23225            )
23226        }
23227        __tmp.put_i16_le(self.param_index);
23228        __tmp.put_u8(self.target_system);
23229        __tmp.put_u8(self.target_component);
23230        for val in &self.param_id {
23231            __tmp.put_u8(*val);
23232        }
23233        if matches!(version, MavlinkVersion::V2) {
23234            let len = __tmp.len();
23235            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23236        } else {
23237            __tmp.len()
23238        }
23239    }
23240}
23241#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23242#[doc = ""]
23243#[doc = "ID: 323"]
23244#[derive(Debug, Clone, PartialEq)]
23245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23247#[cfg_attr(feature = "ts", derive(TS))]
23248#[cfg_attr(feature = "ts", ts(export))]
23249pub struct PARAM_EXT_SET_DATA {
23250    #[doc = "System ID"]
23251    pub target_system: u8,
23252    #[doc = "Component ID"]
23253    pub target_component: u8,
23254    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23255    #[cfg_attr(feature = "ts", ts(type = "string"))]
23256    pub param_id: CharArray<16>,
23257    #[doc = "Parameter value"]
23258    #[cfg_attr(feature = "ts", ts(type = "string"))]
23259    pub param_value: CharArray<128>,
23260    #[doc = "Parameter type."]
23261    pub param_type: MavParamExtType,
23262}
23263impl PARAM_EXT_SET_DATA {
23264    pub const ENCODED_LEN: usize = 147usize;
23265    pub const DEFAULT: Self = Self {
23266        target_system: 0_u8,
23267        target_component: 0_u8,
23268        param_id: CharArray::new([0_u8; 16usize]),
23269        param_value: CharArray::new([0_u8; 128usize]),
23270        param_type: MavParamExtType::DEFAULT,
23271    };
23272    #[cfg(feature = "arbitrary")]
23273    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23274        use arbitrary::{Arbitrary, Unstructured};
23275        let mut buf = [0u8; 1024];
23276        rng.fill_bytes(&mut buf);
23277        let mut unstructured = Unstructured::new(&buf);
23278        Self::arbitrary(&mut unstructured).unwrap_or_default()
23279    }
23280}
23281impl Default for PARAM_EXT_SET_DATA {
23282    fn default() -> Self {
23283        Self::DEFAULT.clone()
23284    }
23285}
23286impl MessageData for PARAM_EXT_SET_DATA {
23287    type Message = MavMessage;
23288    const ID: u32 = 323u32;
23289    const NAME: &'static str = "PARAM_EXT_SET";
23290    const EXTRA_CRC: u8 = 78u8;
23291    const ENCODED_LEN: usize = 147usize;
23292    fn deser(
23293        _version: MavlinkVersion,
23294        __input: &[u8],
23295    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23296        let avail_len = __input.len();
23297        let mut payload_buf = [0; Self::ENCODED_LEN];
23298        let mut buf = if avail_len < Self::ENCODED_LEN {
23299            payload_buf[0..avail_len].copy_from_slice(__input);
23300            Bytes::new(&payload_buf)
23301        } else {
23302            Bytes::new(__input)
23303        };
23304        let mut __struct = Self::default();
23305        __struct.target_system = buf.get_u8()?;
23306        __struct.target_component = buf.get_u8()?;
23307        let mut tmp = [0_u8; 16usize];
23308        for v in &mut tmp {
23309            *v = buf.get_u8()?;
23310        }
23311        __struct.param_id = CharArray::new(tmp);
23312        let mut tmp = [0_u8; 128usize];
23313        for v in &mut tmp {
23314            *v = buf.get_u8()?;
23315        }
23316        __struct.param_value = CharArray::new(tmp);
23317        let tmp = buf.get_u8()?;
23318        __struct.param_type =
23319            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23320                enum_type: "MavParamExtType",
23321                value: tmp as u64,
23322            })?;
23323        Ok(__struct)
23324    }
23325    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23326        let mut __tmp = BytesMut::new(bytes);
23327        #[allow(clippy::absurd_extreme_comparisons)]
23328        #[allow(unused_comparisons)]
23329        if __tmp.remaining() < Self::ENCODED_LEN {
23330            panic!(
23331                "buffer is too small (need {} bytes, but got {})",
23332                Self::ENCODED_LEN,
23333                __tmp.remaining(),
23334            )
23335        }
23336        __tmp.put_u8(self.target_system);
23337        __tmp.put_u8(self.target_component);
23338        for val in &self.param_id {
23339            __tmp.put_u8(*val);
23340        }
23341        for val in &self.param_value {
23342            __tmp.put_u8(*val);
23343        }
23344        __tmp.put_u8(self.param_type as u8);
23345        if matches!(version, MavlinkVersion::V2) {
23346            let len = __tmp.len();
23347            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23348        } else {
23349            __tmp.len()
23350        }
23351    }
23352}
23353#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23354#[doc = ""]
23355#[doc = "ID: 322"]
23356#[derive(Debug, Clone, PartialEq)]
23357#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23358#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23359#[cfg_attr(feature = "ts", derive(TS))]
23360#[cfg_attr(feature = "ts", ts(export))]
23361pub struct PARAM_EXT_VALUE_DATA {
23362    #[doc = "Total number of parameters"]
23363    pub param_count: u16,
23364    #[doc = "Index of this parameter"]
23365    pub param_index: u16,
23366    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23367    #[cfg_attr(feature = "ts", ts(type = "string"))]
23368    pub param_id: CharArray<16>,
23369    #[doc = "Parameter value"]
23370    #[cfg_attr(feature = "ts", ts(type = "string"))]
23371    pub param_value: CharArray<128>,
23372    #[doc = "Parameter type."]
23373    pub param_type: MavParamExtType,
23374}
23375impl PARAM_EXT_VALUE_DATA {
23376    pub const ENCODED_LEN: usize = 149usize;
23377    pub const DEFAULT: Self = Self {
23378        param_count: 0_u16,
23379        param_index: 0_u16,
23380        param_id: CharArray::new([0_u8; 16usize]),
23381        param_value: CharArray::new([0_u8; 128usize]),
23382        param_type: MavParamExtType::DEFAULT,
23383    };
23384    #[cfg(feature = "arbitrary")]
23385    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23386        use arbitrary::{Arbitrary, Unstructured};
23387        let mut buf = [0u8; 1024];
23388        rng.fill_bytes(&mut buf);
23389        let mut unstructured = Unstructured::new(&buf);
23390        Self::arbitrary(&mut unstructured).unwrap_or_default()
23391    }
23392}
23393impl Default for PARAM_EXT_VALUE_DATA {
23394    fn default() -> Self {
23395        Self::DEFAULT.clone()
23396    }
23397}
23398impl MessageData for PARAM_EXT_VALUE_DATA {
23399    type Message = MavMessage;
23400    const ID: u32 = 322u32;
23401    const NAME: &'static str = "PARAM_EXT_VALUE";
23402    const EXTRA_CRC: u8 = 243u8;
23403    const ENCODED_LEN: usize = 149usize;
23404    fn deser(
23405        _version: MavlinkVersion,
23406        __input: &[u8],
23407    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23408        let avail_len = __input.len();
23409        let mut payload_buf = [0; Self::ENCODED_LEN];
23410        let mut buf = if avail_len < Self::ENCODED_LEN {
23411            payload_buf[0..avail_len].copy_from_slice(__input);
23412            Bytes::new(&payload_buf)
23413        } else {
23414            Bytes::new(__input)
23415        };
23416        let mut __struct = Self::default();
23417        __struct.param_count = buf.get_u16_le()?;
23418        __struct.param_index = buf.get_u16_le()?;
23419        let mut tmp = [0_u8; 16usize];
23420        for v in &mut tmp {
23421            *v = buf.get_u8()?;
23422        }
23423        __struct.param_id = CharArray::new(tmp);
23424        let mut tmp = [0_u8; 128usize];
23425        for v in &mut tmp {
23426            *v = buf.get_u8()?;
23427        }
23428        __struct.param_value = CharArray::new(tmp);
23429        let tmp = buf.get_u8()?;
23430        __struct.param_type =
23431            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23432                enum_type: "MavParamExtType",
23433                value: tmp as u64,
23434            })?;
23435        Ok(__struct)
23436    }
23437    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23438        let mut __tmp = BytesMut::new(bytes);
23439        #[allow(clippy::absurd_extreme_comparisons)]
23440        #[allow(unused_comparisons)]
23441        if __tmp.remaining() < Self::ENCODED_LEN {
23442            panic!(
23443                "buffer is too small (need {} bytes, but got {})",
23444                Self::ENCODED_LEN,
23445                __tmp.remaining(),
23446            )
23447        }
23448        __tmp.put_u16_le(self.param_count);
23449        __tmp.put_u16_le(self.param_index);
23450        for val in &self.param_id {
23451            __tmp.put_u8(*val);
23452        }
23453        for val in &self.param_value {
23454            __tmp.put_u8(*val);
23455        }
23456        __tmp.put_u8(self.param_type as u8);
23457        if matches!(version, MavlinkVersion::V2) {
23458            let len = __tmp.len();
23459            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23460        } else {
23461            __tmp.len()
23462        }
23463    }
23464}
23465#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23466#[doc = ""]
23467#[doc = "ID: 50"]
23468#[derive(Debug, Clone, PartialEq)]
23469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23471#[cfg_attr(feature = "ts", derive(TS))]
23472#[cfg_attr(feature = "ts", ts(export))]
23473pub struct PARAM_MAP_RC_DATA {
23474    #[doc = "Initial parameter value"]
23475    pub param_value0: f32,
23476    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23477    pub scale: f32,
23478    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23479    pub param_value_min: f32,
23480    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23481    pub param_value_max: f32,
23482    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23483    pub param_index: i16,
23484    #[doc = "System ID"]
23485    pub target_system: u8,
23486    #[doc = "Component ID"]
23487    pub target_component: u8,
23488    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23489    #[cfg_attr(feature = "ts", ts(type = "string"))]
23490    pub param_id: CharArray<16>,
23491    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23492    pub parameter_rc_channel_index: u8,
23493}
23494impl PARAM_MAP_RC_DATA {
23495    pub const ENCODED_LEN: usize = 37usize;
23496    pub const DEFAULT: Self = Self {
23497        param_value0: 0.0_f32,
23498        scale: 0.0_f32,
23499        param_value_min: 0.0_f32,
23500        param_value_max: 0.0_f32,
23501        param_index: 0_i16,
23502        target_system: 0_u8,
23503        target_component: 0_u8,
23504        param_id: CharArray::new([0_u8; 16usize]),
23505        parameter_rc_channel_index: 0_u8,
23506    };
23507    #[cfg(feature = "arbitrary")]
23508    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23509        use arbitrary::{Arbitrary, Unstructured};
23510        let mut buf = [0u8; 1024];
23511        rng.fill_bytes(&mut buf);
23512        let mut unstructured = Unstructured::new(&buf);
23513        Self::arbitrary(&mut unstructured).unwrap_or_default()
23514    }
23515}
23516impl Default for PARAM_MAP_RC_DATA {
23517    fn default() -> Self {
23518        Self::DEFAULT.clone()
23519    }
23520}
23521impl MessageData for PARAM_MAP_RC_DATA {
23522    type Message = MavMessage;
23523    const ID: u32 = 50u32;
23524    const NAME: &'static str = "PARAM_MAP_RC";
23525    const EXTRA_CRC: u8 = 78u8;
23526    const ENCODED_LEN: usize = 37usize;
23527    fn deser(
23528        _version: MavlinkVersion,
23529        __input: &[u8],
23530    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23531        let avail_len = __input.len();
23532        let mut payload_buf = [0; Self::ENCODED_LEN];
23533        let mut buf = if avail_len < Self::ENCODED_LEN {
23534            payload_buf[0..avail_len].copy_from_slice(__input);
23535            Bytes::new(&payload_buf)
23536        } else {
23537            Bytes::new(__input)
23538        };
23539        let mut __struct = Self::default();
23540        __struct.param_value0 = buf.get_f32_le()?;
23541        __struct.scale = buf.get_f32_le()?;
23542        __struct.param_value_min = buf.get_f32_le()?;
23543        __struct.param_value_max = buf.get_f32_le()?;
23544        __struct.param_index = buf.get_i16_le()?;
23545        __struct.target_system = buf.get_u8()?;
23546        __struct.target_component = buf.get_u8()?;
23547        let mut tmp = [0_u8; 16usize];
23548        for v in &mut tmp {
23549            *v = buf.get_u8()?;
23550        }
23551        __struct.param_id = CharArray::new(tmp);
23552        __struct.parameter_rc_channel_index = buf.get_u8()?;
23553        Ok(__struct)
23554    }
23555    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23556        let mut __tmp = BytesMut::new(bytes);
23557        #[allow(clippy::absurd_extreme_comparisons)]
23558        #[allow(unused_comparisons)]
23559        if __tmp.remaining() < Self::ENCODED_LEN {
23560            panic!(
23561                "buffer is too small (need {} bytes, but got {})",
23562                Self::ENCODED_LEN,
23563                __tmp.remaining(),
23564            )
23565        }
23566        __tmp.put_f32_le(self.param_value0);
23567        __tmp.put_f32_le(self.scale);
23568        __tmp.put_f32_le(self.param_value_min);
23569        __tmp.put_f32_le(self.param_value_max);
23570        __tmp.put_i16_le(self.param_index);
23571        __tmp.put_u8(self.target_system);
23572        __tmp.put_u8(self.target_component);
23573        for val in &self.param_id {
23574            __tmp.put_u8(*val);
23575        }
23576        __tmp.put_u8(self.parameter_rc_channel_index);
23577        if matches!(version, MavlinkVersion::V2) {
23578            let len = __tmp.len();
23579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23580        } else {
23581            __tmp.len()
23582        }
23583    }
23584}
23585#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23586#[doc = ""]
23587#[doc = "ID: 21"]
23588#[derive(Debug, Clone, PartialEq)]
23589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23591#[cfg_attr(feature = "ts", derive(TS))]
23592#[cfg_attr(feature = "ts", ts(export))]
23593pub struct PARAM_REQUEST_LIST_DATA {
23594    #[doc = "System ID"]
23595    pub target_system: u8,
23596    #[doc = "Component ID"]
23597    pub target_component: u8,
23598}
23599impl PARAM_REQUEST_LIST_DATA {
23600    pub const ENCODED_LEN: usize = 2usize;
23601    pub const DEFAULT: Self = Self {
23602        target_system: 0_u8,
23603        target_component: 0_u8,
23604    };
23605    #[cfg(feature = "arbitrary")]
23606    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23607        use arbitrary::{Arbitrary, Unstructured};
23608        let mut buf = [0u8; 1024];
23609        rng.fill_bytes(&mut buf);
23610        let mut unstructured = Unstructured::new(&buf);
23611        Self::arbitrary(&mut unstructured).unwrap_or_default()
23612    }
23613}
23614impl Default for PARAM_REQUEST_LIST_DATA {
23615    fn default() -> Self {
23616        Self::DEFAULT.clone()
23617    }
23618}
23619impl MessageData for PARAM_REQUEST_LIST_DATA {
23620    type Message = MavMessage;
23621    const ID: u32 = 21u32;
23622    const NAME: &'static str = "PARAM_REQUEST_LIST";
23623    const EXTRA_CRC: u8 = 159u8;
23624    const ENCODED_LEN: usize = 2usize;
23625    fn deser(
23626        _version: MavlinkVersion,
23627        __input: &[u8],
23628    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23629        let avail_len = __input.len();
23630        let mut payload_buf = [0; Self::ENCODED_LEN];
23631        let mut buf = if avail_len < Self::ENCODED_LEN {
23632            payload_buf[0..avail_len].copy_from_slice(__input);
23633            Bytes::new(&payload_buf)
23634        } else {
23635            Bytes::new(__input)
23636        };
23637        let mut __struct = Self::default();
23638        __struct.target_system = buf.get_u8()?;
23639        __struct.target_component = buf.get_u8()?;
23640        Ok(__struct)
23641    }
23642    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23643        let mut __tmp = BytesMut::new(bytes);
23644        #[allow(clippy::absurd_extreme_comparisons)]
23645        #[allow(unused_comparisons)]
23646        if __tmp.remaining() < Self::ENCODED_LEN {
23647            panic!(
23648                "buffer is too small (need {} bytes, but got {})",
23649                Self::ENCODED_LEN,
23650                __tmp.remaining(),
23651            )
23652        }
23653        __tmp.put_u8(self.target_system);
23654        __tmp.put_u8(self.target_component);
23655        if matches!(version, MavlinkVersion::V2) {
23656            let len = __tmp.len();
23657            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23658        } else {
23659            __tmp.len()
23660        }
23661    }
23662}
23663#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23664#[doc = ""]
23665#[doc = "ID: 20"]
23666#[derive(Debug, Clone, PartialEq)]
23667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23668#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23669#[cfg_attr(feature = "ts", derive(TS))]
23670#[cfg_attr(feature = "ts", ts(export))]
23671pub struct PARAM_REQUEST_READ_DATA {
23672    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23673    pub param_index: i16,
23674    #[doc = "System ID"]
23675    pub target_system: u8,
23676    #[doc = "Component ID"]
23677    pub target_component: u8,
23678    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23679    #[cfg_attr(feature = "ts", ts(type = "string"))]
23680    pub param_id: CharArray<16>,
23681}
23682impl PARAM_REQUEST_READ_DATA {
23683    pub const ENCODED_LEN: usize = 20usize;
23684    pub const DEFAULT: Self = Self {
23685        param_index: 0_i16,
23686        target_system: 0_u8,
23687        target_component: 0_u8,
23688        param_id: CharArray::new([0_u8; 16usize]),
23689    };
23690    #[cfg(feature = "arbitrary")]
23691    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23692        use arbitrary::{Arbitrary, Unstructured};
23693        let mut buf = [0u8; 1024];
23694        rng.fill_bytes(&mut buf);
23695        let mut unstructured = Unstructured::new(&buf);
23696        Self::arbitrary(&mut unstructured).unwrap_or_default()
23697    }
23698}
23699impl Default for PARAM_REQUEST_READ_DATA {
23700    fn default() -> Self {
23701        Self::DEFAULT.clone()
23702    }
23703}
23704impl MessageData for PARAM_REQUEST_READ_DATA {
23705    type Message = MavMessage;
23706    const ID: u32 = 20u32;
23707    const NAME: &'static str = "PARAM_REQUEST_READ";
23708    const EXTRA_CRC: u8 = 214u8;
23709    const ENCODED_LEN: usize = 20usize;
23710    fn deser(
23711        _version: MavlinkVersion,
23712        __input: &[u8],
23713    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23714        let avail_len = __input.len();
23715        let mut payload_buf = [0; Self::ENCODED_LEN];
23716        let mut buf = if avail_len < Self::ENCODED_LEN {
23717            payload_buf[0..avail_len].copy_from_slice(__input);
23718            Bytes::new(&payload_buf)
23719        } else {
23720            Bytes::new(__input)
23721        };
23722        let mut __struct = Self::default();
23723        __struct.param_index = buf.get_i16_le()?;
23724        __struct.target_system = buf.get_u8()?;
23725        __struct.target_component = buf.get_u8()?;
23726        let mut tmp = [0_u8; 16usize];
23727        for v in &mut tmp {
23728            *v = buf.get_u8()?;
23729        }
23730        __struct.param_id = CharArray::new(tmp);
23731        Ok(__struct)
23732    }
23733    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23734        let mut __tmp = BytesMut::new(bytes);
23735        #[allow(clippy::absurd_extreme_comparisons)]
23736        #[allow(unused_comparisons)]
23737        if __tmp.remaining() < Self::ENCODED_LEN {
23738            panic!(
23739                "buffer is too small (need {} bytes, but got {})",
23740                Self::ENCODED_LEN,
23741                __tmp.remaining(),
23742            )
23743        }
23744        __tmp.put_i16_le(self.param_index);
23745        __tmp.put_u8(self.target_system);
23746        __tmp.put_u8(self.target_component);
23747        for val in &self.param_id {
23748            __tmp.put_u8(*val);
23749        }
23750        if matches!(version, MavlinkVersion::V2) {
23751            let len = __tmp.len();
23752            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23753        } else {
23754            __tmp.len()
23755        }
23756    }
23757}
23758#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23759#[doc = ""]
23760#[doc = "ID: 23"]
23761#[derive(Debug, Clone, PartialEq)]
23762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23764#[cfg_attr(feature = "ts", derive(TS))]
23765#[cfg_attr(feature = "ts", ts(export))]
23766pub struct PARAM_SET_DATA {
23767    #[doc = "Onboard parameter value"]
23768    pub param_value: f32,
23769    #[doc = "System ID"]
23770    pub target_system: u8,
23771    #[doc = "Component ID"]
23772    pub target_component: u8,
23773    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23774    #[cfg_attr(feature = "ts", ts(type = "string"))]
23775    pub param_id: CharArray<16>,
23776    #[doc = "Onboard parameter type."]
23777    pub param_type: MavParamType,
23778}
23779impl PARAM_SET_DATA {
23780    pub const ENCODED_LEN: usize = 23usize;
23781    pub const DEFAULT: Self = Self {
23782        param_value: 0.0_f32,
23783        target_system: 0_u8,
23784        target_component: 0_u8,
23785        param_id: CharArray::new([0_u8; 16usize]),
23786        param_type: MavParamType::DEFAULT,
23787    };
23788    #[cfg(feature = "arbitrary")]
23789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23790        use arbitrary::{Arbitrary, Unstructured};
23791        let mut buf = [0u8; 1024];
23792        rng.fill_bytes(&mut buf);
23793        let mut unstructured = Unstructured::new(&buf);
23794        Self::arbitrary(&mut unstructured).unwrap_or_default()
23795    }
23796}
23797impl Default for PARAM_SET_DATA {
23798    fn default() -> Self {
23799        Self::DEFAULT.clone()
23800    }
23801}
23802impl MessageData for PARAM_SET_DATA {
23803    type Message = MavMessage;
23804    const ID: u32 = 23u32;
23805    const NAME: &'static str = "PARAM_SET";
23806    const EXTRA_CRC: u8 = 168u8;
23807    const ENCODED_LEN: usize = 23usize;
23808    fn deser(
23809        _version: MavlinkVersion,
23810        __input: &[u8],
23811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23812        let avail_len = __input.len();
23813        let mut payload_buf = [0; Self::ENCODED_LEN];
23814        let mut buf = if avail_len < Self::ENCODED_LEN {
23815            payload_buf[0..avail_len].copy_from_slice(__input);
23816            Bytes::new(&payload_buf)
23817        } else {
23818            Bytes::new(__input)
23819        };
23820        let mut __struct = Self::default();
23821        __struct.param_value = buf.get_f32_le()?;
23822        __struct.target_system = buf.get_u8()?;
23823        __struct.target_component = buf.get_u8()?;
23824        let mut tmp = [0_u8; 16usize];
23825        for v in &mut tmp {
23826            *v = buf.get_u8()?;
23827        }
23828        __struct.param_id = CharArray::new(tmp);
23829        let tmp = buf.get_u8()?;
23830        __struct.param_type =
23831            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23832                enum_type: "MavParamType",
23833                value: tmp as u64,
23834            })?;
23835        Ok(__struct)
23836    }
23837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23838        let mut __tmp = BytesMut::new(bytes);
23839        #[allow(clippy::absurd_extreme_comparisons)]
23840        #[allow(unused_comparisons)]
23841        if __tmp.remaining() < Self::ENCODED_LEN {
23842            panic!(
23843                "buffer is too small (need {} bytes, but got {})",
23844                Self::ENCODED_LEN,
23845                __tmp.remaining(),
23846            )
23847        }
23848        __tmp.put_f32_le(self.param_value);
23849        __tmp.put_u8(self.target_system);
23850        __tmp.put_u8(self.target_component);
23851        for val in &self.param_id {
23852            __tmp.put_u8(*val);
23853        }
23854        __tmp.put_u8(self.param_type as u8);
23855        if matches!(version, MavlinkVersion::V2) {
23856            let len = __tmp.len();
23857            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23858        } else {
23859            __tmp.len()
23860        }
23861    }
23862}
23863#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23864#[doc = ""]
23865#[doc = "ID: 22"]
23866#[derive(Debug, Clone, PartialEq)]
23867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23869#[cfg_attr(feature = "ts", derive(TS))]
23870#[cfg_attr(feature = "ts", ts(export))]
23871pub struct PARAM_VALUE_DATA {
23872    #[doc = "Onboard parameter value"]
23873    pub param_value: f32,
23874    #[doc = "Total number of onboard parameters"]
23875    pub param_count: u16,
23876    #[doc = "Index of this onboard parameter"]
23877    pub param_index: u16,
23878    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23879    #[cfg_attr(feature = "ts", ts(type = "string"))]
23880    pub param_id: CharArray<16>,
23881    #[doc = "Onboard parameter type."]
23882    pub param_type: MavParamType,
23883}
23884impl PARAM_VALUE_DATA {
23885    pub const ENCODED_LEN: usize = 25usize;
23886    pub const DEFAULT: Self = Self {
23887        param_value: 0.0_f32,
23888        param_count: 0_u16,
23889        param_index: 0_u16,
23890        param_id: CharArray::new([0_u8; 16usize]),
23891        param_type: MavParamType::DEFAULT,
23892    };
23893    #[cfg(feature = "arbitrary")]
23894    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23895        use arbitrary::{Arbitrary, Unstructured};
23896        let mut buf = [0u8; 1024];
23897        rng.fill_bytes(&mut buf);
23898        let mut unstructured = Unstructured::new(&buf);
23899        Self::arbitrary(&mut unstructured).unwrap_or_default()
23900    }
23901}
23902impl Default for PARAM_VALUE_DATA {
23903    fn default() -> Self {
23904        Self::DEFAULT.clone()
23905    }
23906}
23907impl MessageData for PARAM_VALUE_DATA {
23908    type Message = MavMessage;
23909    const ID: u32 = 22u32;
23910    const NAME: &'static str = "PARAM_VALUE";
23911    const EXTRA_CRC: u8 = 220u8;
23912    const ENCODED_LEN: usize = 25usize;
23913    fn deser(
23914        _version: MavlinkVersion,
23915        __input: &[u8],
23916    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23917        let avail_len = __input.len();
23918        let mut payload_buf = [0; Self::ENCODED_LEN];
23919        let mut buf = if avail_len < Self::ENCODED_LEN {
23920            payload_buf[0..avail_len].copy_from_slice(__input);
23921            Bytes::new(&payload_buf)
23922        } else {
23923            Bytes::new(__input)
23924        };
23925        let mut __struct = Self::default();
23926        __struct.param_value = buf.get_f32_le()?;
23927        __struct.param_count = buf.get_u16_le()?;
23928        __struct.param_index = buf.get_u16_le()?;
23929        let mut tmp = [0_u8; 16usize];
23930        for v in &mut tmp {
23931            *v = buf.get_u8()?;
23932        }
23933        __struct.param_id = CharArray::new(tmp);
23934        let tmp = buf.get_u8()?;
23935        __struct.param_type =
23936            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23937                enum_type: "MavParamType",
23938                value: tmp as u64,
23939            })?;
23940        Ok(__struct)
23941    }
23942    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23943        let mut __tmp = BytesMut::new(bytes);
23944        #[allow(clippy::absurd_extreme_comparisons)]
23945        #[allow(unused_comparisons)]
23946        if __tmp.remaining() < Self::ENCODED_LEN {
23947            panic!(
23948                "buffer is too small (need {} bytes, but got {})",
23949                Self::ENCODED_LEN,
23950                __tmp.remaining(),
23951            )
23952        }
23953        __tmp.put_f32_le(self.param_value);
23954        __tmp.put_u16_le(self.param_count);
23955        __tmp.put_u16_le(self.param_index);
23956        for val in &self.param_id {
23957            __tmp.put_u8(*val);
23958        }
23959        __tmp.put_u8(self.param_type as u8);
23960        if matches!(version, MavlinkVersion::V2) {
23961            let len = __tmp.len();
23962            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23963        } else {
23964            __tmp.len()
23965        }
23966    }
23967}
23968#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
23969#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
23970#[doc = ""]
23971#[doc = "ID: 4"]
23972#[derive(Debug, Clone, PartialEq)]
23973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23975#[cfg_attr(feature = "ts", derive(TS))]
23976#[cfg_attr(feature = "ts", ts(export))]
23977pub struct PING_DATA {
23978    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23979    pub time_usec: u64,
23980    #[doc = "PING sequence"]
23981    pub seq: u32,
23982    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
23983    pub target_system: u8,
23984    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
23985    pub target_component: u8,
23986}
23987impl PING_DATA {
23988    pub const ENCODED_LEN: usize = 14usize;
23989    pub const DEFAULT: Self = Self {
23990        time_usec: 0_u64,
23991        seq: 0_u32,
23992        target_system: 0_u8,
23993        target_component: 0_u8,
23994    };
23995    #[cfg(feature = "arbitrary")]
23996    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23997        use arbitrary::{Arbitrary, Unstructured};
23998        let mut buf = [0u8; 1024];
23999        rng.fill_bytes(&mut buf);
24000        let mut unstructured = Unstructured::new(&buf);
24001        Self::arbitrary(&mut unstructured).unwrap_or_default()
24002    }
24003}
24004impl Default for PING_DATA {
24005    fn default() -> Self {
24006        Self::DEFAULT.clone()
24007    }
24008}
24009impl MessageData for PING_DATA {
24010    type Message = MavMessage;
24011    const ID: u32 = 4u32;
24012    const NAME: &'static str = "PING";
24013    const EXTRA_CRC: u8 = 237u8;
24014    const ENCODED_LEN: usize = 14usize;
24015    fn deser(
24016        _version: MavlinkVersion,
24017        __input: &[u8],
24018    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24019        let avail_len = __input.len();
24020        let mut payload_buf = [0; Self::ENCODED_LEN];
24021        let mut buf = if avail_len < Self::ENCODED_LEN {
24022            payload_buf[0..avail_len].copy_from_slice(__input);
24023            Bytes::new(&payload_buf)
24024        } else {
24025            Bytes::new(__input)
24026        };
24027        let mut __struct = Self::default();
24028        __struct.time_usec = buf.get_u64_le()?;
24029        __struct.seq = buf.get_u32_le()?;
24030        __struct.target_system = buf.get_u8()?;
24031        __struct.target_component = buf.get_u8()?;
24032        Ok(__struct)
24033    }
24034    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24035        let mut __tmp = BytesMut::new(bytes);
24036        #[allow(clippy::absurd_extreme_comparisons)]
24037        #[allow(unused_comparisons)]
24038        if __tmp.remaining() < Self::ENCODED_LEN {
24039            panic!(
24040                "buffer is too small (need {} bytes, but got {})",
24041                Self::ENCODED_LEN,
24042                __tmp.remaining(),
24043            )
24044        }
24045        __tmp.put_u64_le(self.time_usec);
24046        __tmp.put_u32_le(self.seq);
24047        __tmp.put_u8(self.target_system);
24048        __tmp.put_u8(self.target_component);
24049        if matches!(version, MavlinkVersion::V2) {
24050            let len = __tmp.len();
24051            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24052        } else {
24053            __tmp.len()
24054        }
24055    }
24056}
24057#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24058#[doc = "Control vehicle tone generation (buzzer)."]
24059#[doc = ""]
24060#[doc = "ID: 258"]
24061#[derive(Debug, Clone, PartialEq)]
24062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24064#[cfg_attr(feature = "ts", derive(TS))]
24065#[cfg_attr(feature = "ts", ts(export))]
24066pub struct PLAY_TUNE_DATA {
24067    #[doc = "System ID"]
24068    pub target_system: u8,
24069    #[doc = "Component ID"]
24070    pub target_component: u8,
24071    #[doc = "tune in board specific format"]
24072    #[cfg_attr(feature = "ts", ts(type = "string"))]
24073    pub tune: CharArray<30>,
24074    #[doc = "tune extension (appended to tune)"]
24075    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24076    #[cfg_attr(feature = "ts", ts(type = "string"))]
24077    pub tune2: CharArray<200>,
24078}
24079impl PLAY_TUNE_DATA {
24080    pub const ENCODED_LEN: usize = 232usize;
24081    pub const DEFAULT: Self = Self {
24082        target_system: 0_u8,
24083        target_component: 0_u8,
24084        tune: CharArray::new([0_u8; 30usize]),
24085        tune2: CharArray::new([0_u8; 200usize]),
24086    };
24087    #[cfg(feature = "arbitrary")]
24088    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24089        use arbitrary::{Arbitrary, Unstructured};
24090        let mut buf = [0u8; 1024];
24091        rng.fill_bytes(&mut buf);
24092        let mut unstructured = Unstructured::new(&buf);
24093        Self::arbitrary(&mut unstructured).unwrap_or_default()
24094    }
24095}
24096impl Default for PLAY_TUNE_DATA {
24097    fn default() -> Self {
24098        Self::DEFAULT.clone()
24099    }
24100}
24101impl MessageData for PLAY_TUNE_DATA {
24102    type Message = MavMessage;
24103    const ID: u32 = 258u32;
24104    const NAME: &'static str = "PLAY_TUNE";
24105    const EXTRA_CRC: u8 = 187u8;
24106    const ENCODED_LEN: usize = 232usize;
24107    fn deser(
24108        _version: MavlinkVersion,
24109        __input: &[u8],
24110    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24111        let avail_len = __input.len();
24112        let mut payload_buf = [0; Self::ENCODED_LEN];
24113        let mut buf = if avail_len < Self::ENCODED_LEN {
24114            payload_buf[0..avail_len].copy_from_slice(__input);
24115            Bytes::new(&payload_buf)
24116        } else {
24117            Bytes::new(__input)
24118        };
24119        let mut __struct = Self::default();
24120        __struct.target_system = buf.get_u8()?;
24121        __struct.target_component = buf.get_u8()?;
24122        let mut tmp = [0_u8; 30usize];
24123        for v in &mut tmp {
24124            *v = buf.get_u8()?;
24125        }
24126        __struct.tune = CharArray::new(tmp);
24127        let mut tmp = [0_u8; 200usize];
24128        for v in &mut tmp {
24129            *v = buf.get_u8()?;
24130        }
24131        __struct.tune2 = CharArray::new(tmp);
24132        Ok(__struct)
24133    }
24134    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24135        let mut __tmp = BytesMut::new(bytes);
24136        #[allow(clippy::absurd_extreme_comparisons)]
24137        #[allow(unused_comparisons)]
24138        if __tmp.remaining() < Self::ENCODED_LEN {
24139            panic!(
24140                "buffer is too small (need {} bytes, but got {})",
24141                Self::ENCODED_LEN,
24142                __tmp.remaining(),
24143            )
24144        }
24145        __tmp.put_u8(self.target_system);
24146        __tmp.put_u8(self.target_component);
24147        for val in &self.tune {
24148            __tmp.put_u8(*val);
24149        }
24150        if matches!(version, MavlinkVersion::V2) {
24151            for val in &self.tune2 {
24152                __tmp.put_u8(*val);
24153            }
24154            let len = __tmp.len();
24155            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24156        } else {
24157            __tmp.len()
24158        }
24159    }
24160}
24161#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24162#[doc = ""]
24163#[doc = "ID: 400"]
24164#[derive(Debug, Clone, PartialEq)]
24165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24167#[cfg_attr(feature = "ts", derive(TS))]
24168#[cfg_attr(feature = "ts", ts(export))]
24169pub struct PLAY_TUNE_V2_DATA {
24170    #[doc = "Tune format"]
24171    pub format: TuneFormat,
24172    #[doc = "System ID"]
24173    pub target_system: u8,
24174    #[doc = "Component ID"]
24175    pub target_component: u8,
24176    #[doc = "Tune definition as a NULL-terminated string."]
24177    #[cfg_attr(feature = "ts", ts(type = "string"))]
24178    pub tune: CharArray<248>,
24179}
24180impl PLAY_TUNE_V2_DATA {
24181    pub const ENCODED_LEN: usize = 254usize;
24182    pub const DEFAULT: Self = Self {
24183        format: TuneFormat::DEFAULT,
24184        target_system: 0_u8,
24185        target_component: 0_u8,
24186        tune: CharArray::new([0_u8; 248usize]),
24187    };
24188    #[cfg(feature = "arbitrary")]
24189    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24190        use arbitrary::{Arbitrary, Unstructured};
24191        let mut buf = [0u8; 1024];
24192        rng.fill_bytes(&mut buf);
24193        let mut unstructured = Unstructured::new(&buf);
24194        Self::arbitrary(&mut unstructured).unwrap_or_default()
24195    }
24196}
24197impl Default for PLAY_TUNE_V2_DATA {
24198    fn default() -> Self {
24199        Self::DEFAULT.clone()
24200    }
24201}
24202impl MessageData for PLAY_TUNE_V2_DATA {
24203    type Message = MavMessage;
24204    const ID: u32 = 400u32;
24205    const NAME: &'static str = "PLAY_TUNE_V2";
24206    const EXTRA_CRC: u8 = 110u8;
24207    const ENCODED_LEN: usize = 254usize;
24208    fn deser(
24209        _version: MavlinkVersion,
24210        __input: &[u8],
24211    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24212        let avail_len = __input.len();
24213        let mut payload_buf = [0; Self::ENCODED_LEN];
24214        let mut buf = if avail_len < Self::ENCODED_LEN {
24215            payload_buf[0..avail_len].copy_from_slice(__input);
24216            Bytes::new(&payload_buf)
24217        } else {
24218            Bytes::new(__input)
24219        };
24220        let mut __struct = Self::default();
24221        let tmp = buf.get_u32_le()?;
24222        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24223            ::mavlink_core::error::ParserError::InvalidEnum {
24224                enum_type: "TuneFormat",
24225                value: tmp as u64,
24226            },
24227        )?;
24228        __struct.target_system = buf.get_u8()?;
24229        __struct.target_component = buf.get_u8()?;
24230        let mut tmp = [0_u8; 248usize];
24231        for v in &mut tmp {
24232            *v = buf.get_u8()?;
24233        }
24234        __struct.tune = CharArray::new(tmp);
24235        Ok(__struct)
24236    }
24237    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24238        let mut __tmp = BytesMut::new(bytes);
24239        #[allow(clippy::absurd_extreme_comparisons)]
24240        #[allow(unused_comparisons)]
24241        if __tmp.remaining() < Self::ENCODED_LEN {
24242            panic!(
24243                "buffer is too small (need {} bytes, but got {})",
24244                Self::ENCODED_LEN,
24245                __tmp.remaining(),
24246            )
24247        }
24248        __tmp.put_u32_le(self.format as u32);
24249        __tmp.put_u8(self.target_system);
24250        __tmp.put_u8(self.target_component);
24251        for val in &self.tune {
24252            __tmp.put_u8(*val);
24253        }
24254        if matches!(version, MavlinkVersion::V2) {
24255            let len = __tmp.len();
24256            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24257        } else {
24258            __tmp.len()
24259        }
24260    }
24261}
24262#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24263#[doc = ""]
24264#[doc = "ID: 87"]
24265#[derive(Debug, Clone, PartialEq)]
24266#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24268#[cfg_attr(feature = "ts", derive(TS))]
24269#[cfg_attr(feature = "ts", ts(export))]
24270pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24271    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24272    pub time_boot_ms: u32,
24273    #[doc = "Latitude in WGS84 frame"]
24274    pub lat_int: i32,
24275    #[doc = "Longitude in WGS84 frame"]
24276    pub lon_int: i32,
24277    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24278    pub alt: f32,
24279    #[doc = "X velocity in NED frame"]
24280    pub vx: f32,
24281    #[doc = "Y velocity in NED frame"]
24282    pub vy: f32,
24283    #[doc = "Z velocity in NED frame"]
24284    pub vz: f32,
24285    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24286    pub afx: f32,
24287    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24288    pub afy: f32,
24289    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24290    pub afz: f32,
24291    #[doc = "yaw setpoint"]
24292    pub yaw: f32,
24293    #[doc = "yaw rate setpoint"]
24294    pub yaw_rate: f32,
24295    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24296    pub type_mask: PositionTargetTypemask,
24297    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24298    pub coordinate_frame: MavFrame,
24299}
24300impl POSITION_TARGET_GLOBAL_INT_DATA {
24301    pub const ENCODED_LEN: usize = 51usize;
24302    pub const DEFAULT: Self = Self {
24303        time_boot_ms: 0_u32,
24304        lat_int: 0_i32,
24305        lon_int: 0_i32,
24306        alt: 0.0_f32,
24307        vx: 0.0_f32,
24308        vy: 0.0_f32,
24309        vz: 0.0_f32,
24310        afx: 0.0_f32,
24311        afy: 0.0_f32,
24312        afz: 0.0_f32,
24313        yaw: 0.0_f32,
24314        yaw_rate: 0.0_f32,
24315        type_mask: PositionTargetTypemask::DEFAULT,
24316        coordinate_frame: MavFrame::DEFAULT,
24317    };
24318    #[cfg(feature = "arbitrary")]
24319    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24320        use arbitrary::{Arbitrary, Unstructured};
24321        let mut buf = [0u8; 1024];
24322        rng.fill_bytes(&mut buf);
24323        let mut unstructured = Unstructured::new(&buf);
24324        Self::arbitrary(&mut unstructured).unwrap_or_default()
24325    }
24326}
24327impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24328    fn default() -> Self {
24329        Self::DEFAULT.clone()
24330    }
24331}
24332impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24333    type Message = MavMessage;
24334    const ID: u32 = 87u32;
24335    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24336    const EXTRA_CRC: u8 = 150u8;
24337    const ENCODED_LEN: usize = 51usize;
24338    fn deser(
24339        _version: MavlinkVersion,
24340        __input: &[u8],
24341    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24342        let avail_len = __input.len();
24343        let mut payload_buf = [0; Self::ENCODED_LEN];
24344        let mut buf = if avail_len < Self::ENCODED_LEN {
24345            payload_buf[0..avail_len].copy_from_slice(__input);
24346            Bytes::new(&payload_buf)
24347        } else {
24348            Bytes::new(__input)
24349        };
24350        let mut __struct = Self::default();
24351        __struct.time_boot_ms = buf.get_u32_le()?;
24352        __struct.lat_int = buf.get_i32_le()?;
24353        __struct.lon_int = buf.get_i32_le()?;
24354        __struct.alt = buf.get_f32_le()?;
24355        __struct.vx = buf.get_f32_le()?;
24356        __struct.vy = buf.get_f32_le()?;
24357        __struct.vz = buf.get_f32_le()?;
24358        __struct.afx = buf.get_f32_le()?;
24359        __struct.afy = buf.get_f32_le()?;
24360        __struct.afz = buf.get_f32_le()?;
24361        __struct.yaw = buf.get_f32_le()?;
24362        __struct.yaw_rate = buf.get_f32_le()?;
24363        let tmp = buf.get_u16_le()?;
24364        __struct.type_mask =
24365            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
24366                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24367                    flag_type: "PositionTargetTypemask",
24368                    value: tmp as u64,
24369                })?;
24370        let tmp = buf.get_u8()?;
24371        __struct.coordinate_frame =
24372            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24373                enum_type: "MavFrame",
24374                value: tmp as u64,
24375            })?;
24376        Ok(__struct)
24377    }
24378    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24379        let mut __tmp = BytesMut::new(bytes);
24380        #[allow(clippy::absurd_extreme_comparisons)]
24381        #[allow(unused_comparisons)]
24382        if __tmp.remaining() < Self::ENCODED_LEN {
24383            panic!(
24384                "buffer is too small (need {} bytes, but got {})",
24385                Self::ENCODED_LEN,
24386                __tmp.remaining(),
24387            )
24388        }
24389        __tmp.put_u32_le(self.time_boot_ms);
24390        __tmp.put_i32_le(self.lat_int);
24391        __tmp.put_i32_le(self.lon_int);
24392        __tmp.put_f32_le(self.alt);
24393        __tmp.put_f32_le(self.vx);
24394        __tmp.put_f32_le(self.vy);
24395        __tmp.put_f32_le(self.vz);
24396        __tmp.put_f32_le(self.afx);
24397        __tmp.put_f32_le(self.afy);
24398        __tmp.put_f32_le(self.afz);
24399        __tmp.put_f32_le(self.yaw);
24400        __tmp.put_f32_le(self.yaw_rate);
24401        __tmp.put_u16_le(self.type_mask.bits() as u16);
24402        __tmp.put_u8(self.coordinate_frame as u8);
24403        if matches!(version, MavlinkVersion::V2) {
24404            let len = __tmp.len();
24405            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24406        } else {
24407            __tmp.len()
24408        }
24409    }
24410}
24411#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24412#[doc = ""]
24413#[doc = "ID: 85"]
24414#[derive(Debug, Clone, PartialEq)]
24415#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24416#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24417#[cfg_attr(feature = "ts", derive(TS))]
24418#[cfg_attr(feature = "ts", ts(export))]
24419pub struct POSITION_TARGET_LOCAL_NED_DATA {
24420    #[doc = "Timestamp (time since system boot)."]
24421    pub time_boot_ms: u32,
24422    #[doc = "X Position in NED frame"]
24423    pub x: f32,
24424    #[doc = "Y Position in NED frame"]
24425    pub y: f32,
24426    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24427    pub z: f32,
24428    #[doc = "X velocity in NED frame"]
24429    pub vx: f32,
24430    #[doc = "Y velocity in NED frame"]
24431    pub vy: f32,
24432    #[doc = "Z velocity in NED frame"]
24433    pub vz: f32,
24434    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24435    pub afx: f32,
24436    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24437    pub afy: f32,
24438    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24439    pub afz: f32,
24440    #[doc = "yaw setpoint"]
24441    pub yaw: f32,
24442    #[doc = "yaw rate setpoint"]
24443    pub yaw_rate: f32,
24444    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24445    pub type_mask: PositionTargetTypemask,
24446    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24447    pub coordinate_frame: MavFrame,
24448}
24449impl POSITION_TARGET_LOCAL_NED_DATA {
24450    pub const ENCODED_LEN: usize = 51usize;
24451    pub const DEFAULT: Self = Self {
24452        time_boot_ms: 0_u32,
24453        x: 0.0_f32,
24454        y: 0.0_f32,
24455        z: 0.0_f32,
24456        vx: 0.0_f32,
24457        vy: 0.0_f32,
24458        vz: 0.0_f32,
24459        afx: 0.0_f32,
24460        afy: 0.0_f32,
24461        afz: 0.0_f32,
24462        yaw: 0.0_f32,
24463        yaw_rate: 0.0_f32,
24464        type_mask: PositionTargetTypemask::DEFAULT,
24465        coordinate_frame: MavFrame::DEFAULT,
24466    };
24467    #[cfg(feature = "arbitrary")]
24468    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24469        use arbitrary::{Arbitrary, Unstructured};
24470        let mut buf = [0u8; 1024];
24471        rng.fill_bytes(&mut buf);
24472        let mut unstructured = Unstructured::new(&buf);
24473        Self::arbitrary(&mut unstructured).unwrap_or_default()
24474    }
24475}
24476impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24477    fn default() -> Self {
24478        Self::DEFAULT.clone()
24479    }
24480}
24481impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24482    type Message = MavMessage;
24483    const ID: u32 = 85u32;
24484    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24485    const EXTRA_CRC: u8 = 140u8;
24486    const ENCODED_LEN: usize = 51usize;
24487    fn deser(
24488        _version: MavlinkVersion,
24489        __input: &[u8],
24490    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24491        let avail_len = __input.len();
24492        let mut payload_buf = [0; Self::ENCODED_LEN];
24493        let mut buf = if avail_len < Self::ENCODED_LEN {
24494            payload_buf[0..avail_len].copy_from_slice(__input);
24495            Bytes::new(&payload_buf)
24496        } else {
24497            Bytes::new(__input)
24498        };
24499        let mut __struct = Self::default();
24500        __struct.time_boot_ms = buf.get_u32_le()?;
24501        __struct.x = buf.get_f32_le()?;
24502        __struct.y = buf.get_f32_le()?;
24503        __struct.z = buf.get_f32_le()?;
24504        __struct.vx = buf.get_f32_le()?;
24505        __struct.vy = buf.get_f32_le()?;
24506        __struct.vz = buf.get_f32_le()?;
24507        __struct.afx = buf.get_f32_le()?;
24508        __struct.afy = buf.get_f32_le()?;
24509        __struct.afz = buf.get_f32_le()?;
24510        __struct.yaw = buf.get_f32_le()?;
24511        __struct.yaw_rate = buf.get_f32_le()?;
24512        let tmp = buf.get_u16_le()?;
24513        __struct.type_mask =
24514            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
24515                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24516                    flag_type: "PositionTargetTypemask",
24517                    value: tmp as u64,
24518                })?;
24519        let tmp = buf.get_u8()?;
24520        __struct.coordinate_frame =
24521            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24522                enum_type: "MavFrame",
24523                value: tmp as u64,
24524            })?;
24525        Ok(__struct)
24526    }
24527    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24528        let mut __tmp = BytesMut::new(bytes);
24529        #[allow(clippy::absurd_extreme_comparisons)]
24530        #[allow(unused_comparisons)]
24531        if __tmp.remaining() < Self::ENCODED_LEN {
24532            panic!(
24533                "buffer is too small (need {} bytes, but got {})",
24534                Self::ENCODED_LEN,
24535                __tmp.remaining(),
24536            )
24537        }
24538        __tmp.put_u32_le(self.time_boot_ms);
24539        __tmp.put_f32_le(self.x);
24540        __tmp.put_f32_le(self.y);
24541        __tmp.put_f32_le(self.z);
24542        __tmp.put_f32_le(self.vx);
24543        __tmp.put_f32_le(self.vy);
24544        __tmp.put_f32_le(self.vz);
24545        __tmp.put_f32_le(self.afx);
24546        __tmp.put_f32_le(self.afy);
24547        __tmp.put_f32_le(self.afz);
24548        __tmp.put_f32_le(self.yaw);
24549        __tmp.put_f32_le(self.yaw_rate);
24550        __tmp.put_u16_le(self.type_mask.bits() as u16);
24551        __tmp.put_u8(self.coordinate_frame as u8);
24552        if matches!(version, MavlinkVersion::V2) {
24553            let len = __tmp.len();
24554            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24555        } else {
24556            __tmp.len()
24557        }
24558    }
24559}
24560#[doc = "Power supply status."]
24561#[doc = ""]
24562#[doc = "ID: 125"]
24563#[derive(Debug, Clone, PartialEq)]
24564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24566#[cfg_attr(feature = "ts", derive(TS))]
24567#[cfg_attr(feature = "ts", ts(export))]
24568pub struct POWER_STATUS_DATA {
24569    #[doc = "5V rail voltage."]
24570    pub Vcc: u16,
24571    #[doc = "Servo rail voltage."]
24572    pub Vservo: u16,
24573    #[doc = "Bitmap of power supply status flags."]
24574    pub flags: MavPowerStatus,
24575}
24576impl POWER_STATUS_DATA {
24577    pub const ENCODED_LEN: usize = 6usize;
24578    pub const DEFAULT: Self = Self {
24579        Vcc: 0_u16,
24580        Vservo: 0_u16,
24581        flags: MavPowerStatus::DEFAULT,
24582    };
24583    #[cfg(feature = "arbitrary")]
24584    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24585        use arbitrary::{Arbitrary, Unstructured};
24586        let mut buf = [0u8; 1024];
24587        rng.fill_bytes(&mut buf);
24588        let mut unstructured = Unstructured::new(&buf);
24589        Self::arbitrary(&mut unstructured).unwrap_or_default()
24590    }
24591}
24592impl Default for POWER_STATUS_DATA {
24593    fn default() -> Self {
24594        Self::DEFAULT.clone()
24595    }
24596}
24597impl MessageData for POWER_STATUS_DATA {
24598    type Message = MavMessage;
24599    const ID: u32 = 125u32;
24600    const NAME: &'static str = "POWER_STATUS";
24601    const EXTRA_CRC: u8 = 203u8;
24602    const ENCODED_LEN: usize = 6usize;
24603    fn deser(
24604        _version: MavlinkVersion,
24605        __input: &[u8],
24606    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24607        let avail_len = __input.len();
24608        let mut payload_buf = [0; Self::ENCODED_LEN];
24609        let mut buf = if avail_len < Self::ENCODED_LEN {
24610            payload_buf[0..avail_len].copy_from_slice(__input);
24611            Bytes::new(&payload_buf)
24612        } else {
24613            Bytes::new(__input)
24614        };
24615        let mut __struct = Self::default();
24616        __struct.Vcc = buf.get_u16_le()?;
24617        __struct.Vservo = buf.get_u16_le()?;
24618        let tmp = buf.get_u16_le()?;
24619        __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
24620            ::mavlink_core::error::ParserError::InvalidFlag {
24621                flag_type: "MavPowerStatus",
24622                value: tmp as u64,
24623            },
24624        )?;
24625        Ok(__struct)
24626    }
24627    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24628        let mut __tmp = BytesMut::new(bytes);
24629        #[allow(clippy::absurd_extreme_comparisons)]
24630        #[allow(unused_comparisons)]
24631        if __tmp.remaining() < Self::ENCODED_LEN {
24632            panic!(
24633                "buffer is too small (need {} bytes, but got {})",
24634                Self::ENCODED_LEN,
24635                __tmp.remaining(),
24636            )
24637        }
24638        __tmp.put_u16_le(self.Vcc);
24639        __tmp.put_u16_le(self.Vservo);
24640        __tmp.put_u16_le(self.flags.bits() as u16);
24641        if matches!(version, MavlinkVersion::V2) {
24642            let len = __tmp.len();
24643            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24644        } else {
24645            __tmp.len()
24646        }
24647    }
24648}
24649#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24650#[doc = ""]
24651#[doc = "ID: 300"]
24652#[derive(Debug, Clone, PartialEq)]
24653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24654#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24655#[cfg_attr(feature = "ts", derive(TS))]
24656#[cfg_attr(feature = "ts", ts(export))]
24657pub struct PROTOCOL_VERSION_DATA {
24658    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24659    pub version: u16,
24660    #[doc = "Minimum MAVLink version supported"]
24661    pub min_version: u16,
24662    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24663    pub max_version: u16,
24664    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24665    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24666    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24667    pub spec_version_hash: [u8; 8],
24668    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24669    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24670    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24671    pub library_version_hash: [u8; 8],
24672}
24673impl PROTOCOL_VERSION_DATA {
24674    pub const ENCODED_LEN: usize = 22usize;
24675    pub const DEFAULT: Self = Self {
24676        version: 0_u16,
24677        min_version: 0_u16,
24678        max_version: 0_u16,
24679        spec_version_hash: [0_u8; 8usize],
24680        library_version_hash: [0_u8; 8usize],
24681    };
24682    #[cfg(feature = "arbitrary")]
24683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24684        use arbitrary::{Arbitrary, Unstructured};
24685        let mut buf = [0u8; 1024];
24686        rng.fill_bytes(&mut buf);
24687        let mut unstructured = Unstructured::new(&buf);
24688        Self::arbitrary(&mut unstructured).unwrap_or_default()
24689    }
24690}
24691impl Default for PROTOCOL_VERSION_DATA {
24692    fn default() -> Self {
24693        Self::DEFAULT.clone()
24694    }
24695}
24696impl MessageData for PROTOCOL_VERSION_DATA {
24697    type Message = MavMessage;
24698    const ID: u32 = 300u32;
24699    const NAME: &'static str = "PROTOCOL_VERSION";
24700    const EXTRA_CRC: u8 = 217u8;
24701    const ENCODED_LEN: usize = 22usize;
24702    fn deser(
24703        _version: MavlinkVersion,
24704        __input: &[u8],
24705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24706        let avail_len = __input.len();
24707        let mut payload_buf = [0; Self::ENCODED_LEN];
24708        let mut buf = if avail_len < Self::ENCODED_LEN {
24709            payload_buf[0..avail_len].copy_from_slice(__input);
24710            Bytes::new(&payload_buf)
24711        } else {
24712            Bytes::new(__input)
24713        };
24714        let mut __struct = Self::default();
24715        __struct.version = buf.get_u16_le()?;
24716        __struct.min_version = buf.get_u16_le()?;
24717        __struct.max_version = buf.get_u16_le()?;
24718        for v in &mut __struct.spec_version_hash {
24719            let val = buf.get_u8()?;
24720            *v = val;
24721        }
24722        for v in &mut __struct.library_version_hash {
24723            let val = buf.get_u8()?;
24724            *v = val;
24725        }
24726        Ok(__struct)
24727    }
24728    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24729        let mut __tmp = BytesMut::new(bytes);
24730        #[allow(clippy::absurd_extreme_comparisons)]
24731        #[allow(unused_comparisons)]
24732        if __tmp.remaining() < Self::ENCODED_LEN {
24733            panic!(
24734                "buffer is too small (need {} bytes, but got {})",
24735                Self::ENCODED_LEN,
24736                __tmp.remaining(),
24737            )
24738        }
24739        __tmp.put_u16_le(self.version);
24740        __tmp.put_u16_le(self.min_version);
24741        __tmp.put_u16_le(self.max_version);
24742        for val in &self.spec_version_hash {
24743            __tmp.put_u8(*val);
24744        }
24745        for val in &self.library_version_hash {
24746            __tmp.put_u8(*val);
24747        }
24748        if matches!(version, MavlinkVersion::V2) {
24749            let len = __tmp.len();
24750            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24751        } else {
24752            __tmp.len()
24753        }
24754    }
24755}
24756#[doc = "Status generated by radio and injected into MAVLink stream."]
24757#[doc = ""]
24758#[doc = "ID: 109"]
24759#[derive(Debug, Clone, PartialEq)]
24760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24762#[cfg_attr(feature = "ts", derive(TS))]
24763#[cfg_attr(feature = "ts", ts(export))]
24764pub struct RADIO_STATUS_DATA {
24765    #[doc = "Count of radio packet receive errors (since boot)."]
24766    pub rxerrors: u16,
24767    #[doc = "Count of error corrected radio packets (since boot)."]
24768    pub fixed: u16,
24769    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24770    pub rssi: u8,
24771    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24772    pub remrssi: u8,
24773    #[doc = "Remaining free transmitter buffer space."]
24774    pub txbuf: u8,
24775    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24776    pub noise: u8,
24777    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24778    pub remnoise: u8,
24779}
24780impl RADIO_STATUS_DATA {
24781    pub const ENCODED_LEN: usize = 9usize;
24782    pub const DEFAULT: Self = Self {
24783        rxerrors: 0_u16,
24784        fixed: 0_u16,
24785        rssi: 0_u8,
24786        remrssi: 0_u8,
24787        txbuf: 0_u8,
24788        noise: 0_u8,
24789        remnoise: 0_u8,
24790    };
24791    #[cfg(feature = "arbitrary")]
24792    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24793        use arbitrary::{Arbitrary, Unstructured};
24794        let mut buf = [0u8; 1024];
24795        rng.fill_bytes(&mut buf);
24796        let mut unstructured = Unstructured::new(&buf);
24797        Self::arbitrary(&mut unstructured).unwrap_or_default()
24798    }
24799}
24800impl Default for RADIO_STATUS_DATA {
24801    fn default() -> Self {
24802        Self::DEFAULT.clone()
24803    }
24804}
24805impl MessageData for RADIO_STATUS_DATA {
24806    type Message = MavMessage;
24807    const ID: u32 = 109u32;
24808    const NAME: &'static str = "RADIO_STATUS";
24809    const EXTRA_CRC: u8 = 185u8;
24810    const ENCODED_LEN: usize = 9usize;
24811    fn deser(
24812        _version: MavlinkVersion,
24813        __input: &[u8],
24814    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24815        let avail_len = __input.len();
24816        let mut payload_buf = [0; Self::ENCODED_LEN];
24817        let mut buf = if avail_len < Self::ENCODED_LEN {
24818            payload_buf[0..avail_len].copy_from_slice(__input);
24819            Bytes::new(&payload_buf)
24820        } else {
24821            Bytes::new(__input)
24822        };
24823        let mut __struct = Self::default();
24824        __struct.rxerrors = buf.get_u16_le()?;
24825        __struct.fixed = buf.get_u16_le()?;
24826        __struct.rssi = buf.get_u8()?;
24827        __struct.remrssi = buf.get_u8()?;
24828        __struct.txbuf = buf.get_u8()?;
24829        __struct.noise = buf.get_u8()?;
24830        __struct.remnoise = buf.get_u8()?;
24831        Ok(__struct)
24832    }
24833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24834        let mut __tmp = BytesMut::new(bytes);
24835        #[allow(clippy::absurd_extreme_comparisons)]
24836        #[allow(unused_comparisons)]
24837        if __tmp.remaining() < Self::ENCODED_LEN {
24838            panic!(
24839                "buffer is too small (need {} bytes, but got {})",
24840                Self::ENCODED_LEN,
24841                __tmp.remaining(),
24842            )
24843        }
24844        __tmp.put_u16_le(self.rxerrors);
24845        __tmp.put_u16_le(self.fixed);
24846        __tmp.put_u8(self.rssi);
24847        __tmp.put_u8(self.remrssi);
24848        __tmp.put_u8(self.txbuf);
24849        __tmp.put_u8(self.noise);
24850        __tmp.put_u8(self.remnoise);
24851        if matches!(version, MavlinkVersion::V2) {
24852            let len = __tmp.len();
24853            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24854        } else {
24855            __tmp.len()
24856        }
24857    }
24858}
24859#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
24860#[doc = ""]
24861#[doc = "ID: 27"]
24862#[derive(Debug, Clone, PartialEq)]
24863#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24864#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24865#[cfg_attr(feature = "ts", derive(TS))]
24866#[cfg_attr(feature = "ts", ts(export))]
24867pub struct RAW_IMU_DATA {
24868    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24869    pub time_usec: u64,
24870    #[doc = "X acceleration (raw)"]
24871    pub xacc: i16,
24872    #[doc = "Y acceleration (raw)"]
24873    pub yacc: i16,
24874    #[doc = "Z acceleration (raw)"]
24875    pub zacc: i16,
24876    #[doc = "Angular speed around X axis (raw)"]
24877    pub xgyro: i16,
24878    #[doc = "Angular speed around Y axis (raw)"]
24879    pub ygyro: i16,
24880    #[doc = "Angular speed around Z axis (raw)"]
24881    pub zgyro: i16,
24882    #[doc = "X Magnetic field (raw)"]
24883    pub xmag: i16,
24884    #[doc = "Y Magnetic field (raw)"]
24885    pub ymag: i16,
24886    #[doc = "Z Magnetic field (raw)"]
24887    pub zmag: i16,
24888    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
24889    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24890    pub id: u8,
24891    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
24892    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24893    pub temperature: i16,
24894}
24895impl RAW_IMU_DATA {
24896    pub const ENCODED_LEN: usize = 29usize;
24897    pub const DEFAULT: Self = Self {
24898        time_usec: 0_u64,
24899        xacc: 0_i16,
24900        yacc: 0_i16,
24901        zacc: 0_i16,
24902        xgyro: 0_i16,
24903        ygyro: 0_i16,
24904        zgyro: 0_i16,
24905        xmag: 0_i16,
24906        ymag: 0_i16,
24907        zmag: 0_i16,
24908        id: 0_u8,
24909        temperature: 0_i16,
24910    };
24911    #[cfg(feature = "arbitrary")]
24912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24913        use arbitrary::{Arbitrary, Unstructured};
24914        let mut buf = [0u8; 1024];
24915        rng.fill_bytes(&mut buf);
24916        let mut unstructured = Unstructured::new(&buf);
24917        Self::arbitrary(&mut unstructured).unwrap_or_default()
24918    }
24919}
24920impl Default for RAW_IMU_DATA {
24921    fn default() -> Self {
24922        Self::DEFAULT.clone()
24923    }
24924}
24925impl MessageData for RAW_IMU_DATA {
24926    type Message = MavMessage;
24927    const ID: u32 = 27u32;
24928    const NAME: &'static str = "RAW_IMU";
24929    const EXTRA_CRC: u8 = 144u8;
24930    const ENCODED_LEN: usize = 29usize;
24931    fn deser(
24932        _version: MavlinkVersion,
24933        __input: &[u8],
24934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24935        let avail_len = __input.len();
24936        let mut payload_buf = [0; Self::ENCODED_LEN];
24937        let mut buf = if avail_len < Self::ENCODED_LEN {
24938            payload_buf[0..avail_len].copy_from_slice(__input);
24939            Bytes::new(&payload_buf)
24940        } else {
24941            Bytes::new(__input)
24942        };
24943        let mut __struct = Self::default();
24944        __struct.time_usec = buf.get_u64_le()?;
24945        __struct.xacc = buf.get_i16_le()?;
24946        __struct.yacc = buf.get_i16_le()?;
24947        __struct.zacc = buf.get_i16_le()?;
24948        __struct.xgyro = buf.get_i16_le()?;
24949        __struct.ygyro = buf.get_i16_le()?;
24950        __struct.zgyro = buf.get_i16_le()?;
24951        __struct.xmag = buf.get_i16_le()?;
24952        __struct.ymag = buf.get_i16_le()?;
24953        __struct.zmag = buf.get_i16_le()?;
24954        __struct.id = buf.get_u8()?;
24955        __struct.temperature = buf.get_i16_le()?;
24956        Ok(__struct)
24957    }
24958    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24959        let mut __tmp = BytesMut::new(bytes);
24960        #[allow(clippy::absurd_extreme_comparisons)]
24961        #[allow(unused_comparisons)]
24962        if __tmp.remaining() < Self::ENCODED_LEN {
24963            panic!(
24964                "buffer is too small (need {} bytes, but got {})",
24965                Self::ENCODED_LEN,
24966                __tmp.remaining(),
24967            )
24968        }
24969        __tmp.put_u64_le(self.time_usec);
24970        __tmp.put_i16_le(self.xacc);
24971        __tmp.put_i16_le(self.yacc);
24972        __tmp.put_i16_le(self.zacc);
24973        __tmp.put_i16_le(self.xgyro);
24974        __tmp.put_i16_le(self.ygyro);
24975        __tmp.put_i16_le(self.zgyro);
24976        __tmp.put_i16_le(self.xmag);
24977        __tmp.put_i16_le(self.ymag);
24978        __tmp.put_i16_le(self.zmag);
24979        if matches!(version, MavlinkVersion::V2) {
24980            __tmp.put_u8(self.id);
24981            __tmp.put_i16_le(self.temperature);
24982            let len = __tmp.len();
24983            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24984        } else {
24985            __tmp.len()
24986        }
24987    }
24988}
24989#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
24990#[doc = ""]
24991#[doc = "ID: 28"]
24992#[derive(Debug, Clone, PartialEq)]
24993#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24995#[cfg_attr(feature = "ts", derive(TS))]
24996#[cfg_attr(feature = "ts", ts(export))]
24997pub struct RAW_PRESSURE_DATA {
24998    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24999    pub time_usec: u64,
25000    #[doc = "Absolute pressure (raw)"]
25001    pub press_abs: i16,
25002    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25003    pub press_diff1: i16,
25004    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25005    pub press_diff2: i16,
25006    #[doc = "Raw Temperature measurement (raw)"]
25007    pub temperature: i16,
25008}
25009impl RAW_PRESSURE_DATA {
25010    pub const ENCODED_LEN: usize = 16usize;
25011    pub const DEFAULT: Self = Self {
25012        time_usec: 0_u64,
25013        press_abs: 0_i16,
25014        press_diff1: 0_i16,
25015        press_diff2: 0_i16,
25016        temperature: 0_i16,
25017    };
25018    #[cfg(feature = "arbitrary")]
25019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25020        use arbitrary::{Arbitrary, Unstructured};
25021        let mut buf = [0u8; 1024];
25022        rng.fill_bytes(&mut buf);
25023        let mut unstructured = Unstructured::new(&buf);
25024        Self::arbitrary(&mut unstructured).unwrap_or_default()
25025    }
25026}
25027impl Default for RAW_PRESSURE_DATA {
25028    fn default() -> Self {
25029        Self::DEFAULT.clone()
25030    }
25031}
25032impl MessageData for RAW_PRESSURE_DATA {
25033    type Message = MavMessage;
25034    const ID: u32 = 28u32;
25035    const NAME: &'static str = "RAW_PRESSURE";
25036    const EXTRA_CRC: u8 = 67u8;
25037    const ENCODED_LEN: usize = 16usize;
25038    fn deser(
25039        _version: MavlinkVersion,
25040        __input: &[u8],
25041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25042        let avail_len = __input.len();
25043        let mut payload_buf = [0; Self::ENCODED_LEN];
25044        let mut buf = if avail_len < Self::ENCODED_LEN {
25045            payload_buf[0..avail_len].copy_from_slice(__input);
25046            Bytes::new(&payload_buf)
25047        } else {
25048            Bytes::new(__input)
25049        };
25050        let mut __struct = Self::default();
25051        __struct.time_usec = buf.get_u64_le()?;
25052        __struct.press_abs = buf.get_i16_le()?;
25053        __struct.press_diff1 = buf.get_i16_le()?;
25054        __struct.press_diff2 = buf.get_i16_le()?;
25055        __struct.temperature = buf.get_i16_le()?;
25056        Ok(__struct)
25057    }
25058    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25059        let mut __tmp = BytesMut::new(bytes);
25060        #[allow(clippy::absurd_extreme_comparisons)]
25061        #[allow(unused_comparisons)]
25062        if __tmp.remaining() < Self::ENCODED_LEN {
25063            panic!(
25064                "buffer is too small (need {} bytes, but got {})",
25065                Self::ENCODED_LEN,
25066                __tmp.remaining(),
25067            )
25068        }
25069        __tmp.put_u64_le(self.time_usec);
25070        __tmp.put_i16_le(self.press_abs);
25071        __tmp.put_i16_le(self.press_diff1);
25072        __tmp.put_i16_le(self.press_diff2);
25073        __tmp.put_i16_le(self.temperature);
25074        if matches!(version, MavlinkVersion::V2) {
25075            let len = __tmp.len();
25076            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25077        } else {
25078            __tmp.len()
25079        }
25080    }
25081}
25082#[doc = "RPM sensor data message."]
25083#[doc = ""]
25084#[doc = "ID: 339"]
25085#[derive(Debug, Clone, PartialEq)]
25086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25088#[cfg_attr(feature = "ts", derive(TS))]
25089#[cfg_attr(feature = "ts", ts(export))]
25090pub struct RAW_RPM_DATA {
25091    #[doc = "Indicated rate"]
25092    pub frequency: f32,
25093    #[doc = "Index of this RPM sensor (0-indexed)"]
25094    pub index: u8,
25095}
25096impl RAW_RPM_DATA {
25097    pub const ENCODED_LEN: usize = 5usize;
25098    pub const DEFAULT: Self = Self {
25099        frequency: 0.0_f32,
25100        index: 0_u8,
25101    };
25102    #[cfg(feature = "arbitrary")]
25103    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25104        use arbitrary::{Arbitrary, Unstructured};
25105        let mut buf = [0u8; 1024];
25106        rng.fill_bytes(&mut buf);
25107        let mut unstructured = Unstructured::new(&buf);
25108        Self::arbitrary(&mut unstructured).unwrap_or_default()
25109    }
25110}
25111impl Default for RAW_RPM_DATA {
25112    fn default() -> Self {
25113        Self::DEFAULT.clone()
25114    }
25115}
25116impl MessageData for RAW_RPM_DATA {
25117    type Message = MavMessage;
25118    const ID: u32 = 339u32;
25119    const NAME: &'static str = "RAW_RPM";
25120    const EXTRA_CRC: u8 = 199u8;
25121    const ENCODED_LEN: usize = 5usize;
25122    fn deser(
25123        _version: MavlinkVersion,
25124        __input: &[u8],
25125    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25126        let avail_len = __input.len();
25127        let mut payload_buf = [0; Self::ENCODED_LEN];
25128        let mut buf = if avail_len < Self::ENCODED_LEN {
25129            payload_buf[0..avail_len].copy_from_slice(__input);
25130            Bytes::new(&payload_buf)
25131        } else {
25132            Bytes::new(__input)
25133        };
25134        let mut __struct = Self::default();
25135        __struct.frequency = buf.get_f32_le()?;
25136        __struct.index = buf.get_u8()?;
25137        Ok(__struct)
25138    }
25139    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25140        let mut __tmp = BytesMut::new(bytes);
25141        #[allow(clippy::absurd_extreme_comparisons)]
25142        #[allow(unused_comparisons)]
25143        if __tmp.remaining() < Self::ENCODED_LEN {
25144            panic!(
25145                "buffer is too small (need {} bytes, but got {})",
25146                Self::ENCODED_LEN,
25147                __tmp.remaining(),
25148            )
25149        }
25150        __tmp.put_f32_le(self.frequency);
25151        __tmp.put_u8(self.index);
25152        if matches!(version, MavlinkVersion::V2) {
25153            let len = __tmp.len();
25154            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25155        } else {
25156            __tmp.len()
25157        }
25158    }
25159}
25160#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25161#[doc = ""]
25162#[doc = "ID: 65"]
25163#[derive(Debug, Clone, PartialEq)]
25164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25166#[cfg_attr(feature = "ts", derive(TS))]
25167#[cfg_attr(feature = "ts", ts(export))]
25168pub struct RC_CHANNELS_DATA {
25169    #[doc = "Timestamp (time since system boot)."]
25170    pub time_boot_ms: u32,
25171    #[doc = "RC channel 1 value."]
25172    pub chan1_raw: u16,
25173    #[doc = "RC channel 2 value."]
25174    pub chan2_raw: u16,
25175    #[doc = "RC channel 3 value."]
25176    pub chan3_raw: u16,
25177    #[doc = "RC channel 4 value."]
25178    pub chan4_raw: u16,
25179    #[doc = "RC channel 5 value."]
25180    pub chan5_raw: u16,
25181    #[doc = "RC channel 6 value."]
25182    pub chan6_raw: u16,
25183    #[doc = "RC channel 7 value."]
25184    pub chan7_raw: u16,
25185    #[doc = "RC channel 8 value."]
25186    pub chan8_raw: u16,
25187    #[doc = "RC channel 9 value."]
25188    pub chan9_raw: u16,
25189    #[doc = "RC channel 10 value."]
25190    pub chan10_raw: u16,
25191    #[doc = "RC channel 11 value."]
25192    pub chan11_raw: u16,
25193    #[doc = "RC channel 12 value."]
25194    pub chan12_raw: u16,
25195    #[doc = "RC channel 13 value."]
25196    pub chan13_raw: u16,
25197    #[doc = "RC channel 14 value."]
25198    pub chan14_raw: u16,
25199    #[doc = "RC channel 15 value."]
25200    pub chan15_raw: u16,
25201    #[doc = "RC channel 16 value."]
25202    pub chan16_raw: u16,
25203    #[doc = "RC channel 17 value."]
25204    pub chan17_raw: u16,
25205    #[doc = "RC channel 18 value."]
25206    pub chan18_raw: u16,
25207    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25208    pub chancount: u8,
25209    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25210    pub rssi: u8,
25211}
25212impl RC_CHANNELS_DATA {
25213    pub const ENCODED_LEN: usize = 42usize;
25214    pub const DEFAULT: Self = Self {
25215        time_boot_ms: 0_u32,
25216        chan1_raw: 0_u16,
25217        chan2_raw: 0_u16,
25218        chan3_raw: 0_u16,
25219        chan4_raw: 0_u16,
25220        chan5_raw: 0_u16,
25221        chan6_raw: 0_u16,
25222        chan7_raw: 0_u16,
25223        chan8_raw: 0_u16,
25224        chan9_raw: 0_u16,
25225        chan10_raw: 0_u16,
25226        chan11_raw: 0_u16,
25227        chan12_raw: 0_u16,
25228        chan13_raw: 0_u16,
25229        chan14_raw: 0_u16,
25230        chan15_raw: 0_u16,
25231        chan16_raw: 0_u16,
25232        chan17_raw: 0_u16,
25233        chan18_raw: 0_u16,
25234        chancount: 0_u8,
25235        rssi: 0_u8,
25236    };
25237    #[cfg(feature = "arbitrary")]
25238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25239        use arbitrary::{Arbitrary, Unstructured};
25240        let mut buf = [0u8; 1024];
25241        rng.fill_bytes(&mut buf);
25242        let mut unstructured = Unstructured::new(&buf);
25243        Self::arbitrary(&mut unstructured).unwrap_or_default()
25244    }
25245}
25246impl Default for RC_CHANNELS_DATA {
25247    fn default() -> Self {
25248        Self::DEFAULT.clone()
25249    }
25250}
25251impl MessageData for RC_CHANNELS_DATA {
25252    type Message = MavMessage;
25253    const ID: u32 = 65u32;
25254    const NAME: &'static str = "RC_CHANNELS";
25255    const EXTRA_CRC: u8 = 118u8;
25256    const ENCODED_LEN: usize = 42usize;
25257    fn deser(
25258        _version: MavlinkVersion,
25259        __input: &[u8],
25260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25261        let avail_len = __input.len();
25262        let mut payload_buf = [0; Self::ENCODED_LEN];
25263        let mut buf = if avail_len < Self::ENCODED_LEN {
25264            payload_buf[0..avail_len].copy_from_slice(__input);
25265            Bytes::new(&payload_buf)
25266        } else {
25267            Bytes::new(__input)
25268        };
25269        let mut __struct = Self::default();
25270        __struct.time_boot_ms = buf.get_u32_le()?;
25271        __struct.chan1_raw = buf.get_u16_le()?;
25272        __struct.chan2_raw = buf.get_u16_le()?;
25273        __struct.chan3_raw = buf.get_u16_le()?;
25274        __struct.chan4_raw = buf.get_u16_le()?;
25275        __struct.chan5_raw = buf.get_u16_le()?;
25276        __struct.chan6_raw = buf.get_u16_le()?;
25277        __struct.chan7_raw = buf.get_u16_le()?;
25278        __struct.chan8_raw = buf.get_u16_le()?;
25279        __struct.chan9_raw = buf.get_u16_le()?;
25280        __struct.chan10_raw = buf.get_u16_le()?;
25281        __struct.chan11_raw = buf.get_u16_le()?;
25282        __struct.chan12_raw = buf.get_u16_le()?;
25283        __struct.chan13_raw = buf.get_u16_le()?;
25284        __struct.chan14_raw = buf.get_u16_le()?;
25285        __struct.chan15_raw = buf.get_u16_le()?;
25286        __struct.chan16_raw = buf.get_u16_le()?;
25287        __struct.chan17_raw = buf.get_u16_le()?;
25288        __struct.chan18_raw = buf.get_u16_le()?;
25289        __struct.chancount = buf.get_u8()?;
25290        __struct.rssi = buf.get_u8()?;
25291        Ok(__struct)
25292    }
25293    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25294        let mut __tmp = BytesMut::new(bytes);
25295        #[allow(clippy::absurd_extreme_comparisons)]
25296        #[allow(unused_comparisons)]
25297        if __tmp.remaining() < Self::ENCODED_LEN {
25298            panic!(
25299                "buffer is too small (need {} bytes, but got {})",
25300                Self::ENCODED_LEN,
25301                __tmp.remaining(),
25302            )
25303        }
25304        __tmp.put_u32_le(self.time_boot_ms);
25305        __tmp.put_u16_le(self.chan1_raw);
25306        __tmp.put_u16_le(self.chan2_raw);
25307        __tmp.put_u16_le(self.chan3_raw);
25308        __tmp.put_u16_le(self.chan4_raw);
25309        __tmp.put_u16_le(self.chan5_raw);
25310        __tmp.put_u16_le(self.chan6_raw);
25311        __tmp.put_u16_le(self.chan7_raw);
25312        __tmp.put_u16_le(self.chan8_raw);
25313        __tmp.put_u16_le(self.chan9_raw);
25314        __tmp.put_u16_le(self.chan10_raw);
25315        __tmp.put_u16_le(self.chan11_raw);
25316        __tmp.put_u16_le(self.chan12_raw);
25317        __tmp.put_u16_le(self.chan13_raw);
25318        __tmp.put_u16_le(self.chan14_raw);
25319        __tmp.put_u16_le(self.chan15_raw);
25320        __tmp.put_u16_le(self.chan16_raw);
25321        __tmp.put_u16_le(self.chan17_raw);
25322        __tmp.put_u16_le(self.chan18_raw);
25323        __tmp.put_u8(self.chancount);
25324        __tmp.put_u8(self.rssi);
25325        if matches!(version, MavlinkVersion::V2) {
25326            let len = __tmp.len();
25327            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25328        } else {
25329            __tmp.len()
25330        }
25331    }
25332}
25333#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25334#[doc = ""]
25335#[doc = "ID: 70"]
25336#[derive(Debug, Clone, PartialEq)]
25337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25339#[cfg_attr(feature = "ts", derive(TS))]
25340#[cfg_attr(feature = "ts", ts(export))]
25341pub struct RC_CHANNELS_OVERRIDE_DATA {
25342    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25343    pub chan1_raw: u16,
25344    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25345    pub chan2_raw: u16,
25346    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25347    pub chan3_raw: u16,
25348    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25349    pub chan4_raw: u16,
25350    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25351    pub chan5_raw: u16,
25352    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25353    pub chan6_raw: u16,
25354    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25355    pub chan7_raw: u16,
25356    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25357    pub chan8_raw: u16,
25358    #[doc = "System ID"]
25359    pub target_system: u8,
25360    #[doc = "Component ID"]
25361    pub target_component: u8,
25362    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25363    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25364    pub chan9_raw: u16,
25365    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25366    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25367    pub chan10_raw: u16,
25368    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25369    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25370    pub chan11_raw: u16,
25371    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25372    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25373    pub chan12_raw: u16,
25374    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25375    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25376    pub chan13_raw: u16,
25377    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25378    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25379    pub chan14_raw: u16,
25380    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25381    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25382    pub chan15_raw: u16,
25383    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25384    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25385    pub chan16_raw: u16,
25386    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25387    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25388    pub chan17_raw: u16,
25389    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25390    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25391    pub chan18_raw: u16,
25392}
25393impl RC_CHANNELS_OVERRIDE_DATA {
25394    pub const ENCODED_LEN: usize = 38usize;
25395    pub const DEFAULT: Self = Self {
25396        chan1_raw: 0_u16,
25397        chan2_raw: 0_u16,
25398        chan3_raw: 0_u16,
25399        chan4_raw: 0_u16,
25400        chan5_raw: 0_u16,
25401        chan6_raw: 0_u16,
25402        chan7_raw: 0_u16,
25403        chan8_raw: 0_u16,
25404        target_system: 0_u8,
25405        target_component: 0_u8,
25406        chan9_raw: 0_u16,
25407        chan10_raw: 0_u16,
25408        chan11_raw: 0_u16,
25409        chan12_raw: 0_u16,
25410        chan13_raw: 0_u16,
25411        chan14_raw: 0_u16,
25412        chan15_raw: 0_u16,
25413        chan16_raw: 0_u16,
25414        chan17_raw: 0_u16,
25415        chan18_raw: 0_u16,
25416    };
25417    #[cfg(feature = "arbitrary")]
25418    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25419        use arbitrary::{Arbitrary, Unstructured};
25420        let mut buf = [0u8; 1024];
25421        rng.fill_bytes(&mut buf);
25422        let mut unstructured = Unstructured::new(&buf);
25423        Self::arbitrary(&mut unstructured).unwrap_or_default()
25424    }
25425}
25426impl Default for RC_CHANNELS_OVERRIDE_DATA {
25427    fn default() -> Self {
25428        Self::DEFAULT.clone()
25429    }
25430}
25431impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25432    type Message = MavMessage;
25433    const ID: u32 = 70u32;
25434    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25435    const EXTRA_CRC: u8 = 124u8;
25436    const ENCODED_LEN: usize = 38usize;
25437    fn deser(
25438        _version: MavlinkVersion,
25439        __input: &[u8],
25440    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25441        let avail_len = __input.len();
25442        let mut payload_buf = [0; Self::ENCODED_LEN];
25443        let mut buf = if avail_len < Self::ENCODED_LEN {
25444            payload_buf[0..avail_len].copy_from_slice(__input);
25445            Bytes::new(&payload_buf)
25446        } else {
25447            Bytes::new(__input)
25448        };
25449        let mut __struct = Self::default();
25450        __struct.chan1_raw = buf.get_u16_le()?;
25451        __struct.chan2_raw = buf.get_u16_le()?;
25452        __struct.chan3_raw = buf.get_u16_le()?;
25453        __struct.chan4_raw = buf.get_u16_le()?;
25454        __struct.chan5_raw = buf.get_u16_le()?;
25455        __struct.chan6_raw = buf.get_u16_le()?;
25456        __struct.chan7_raw = buf.get_u16_le()?;
25457        __struct.chan8_raw = buf.get_u16_le()?;
25458        __struct.target_system = buf.get_u8()?;
25459        __struct.target_component = buf.get_u8()?;
25460        __struct.chan9_raw = buf.get_u16_le()?;
25461        __struct.chan10_raw = buf.get_u16_le()?;
25462        __struct.chan11_raw = buf.get_u16_le()?;
25463        __struct.chan12_raw = buf.get_u16_le()?;
25464        __struct.chan13_raw = buf.get_u16_le()?;
25465        __struct.chan14_raw = buf.get_u16_le()?;
25466        __struct.chan15_raw = buf.get_u16_le()?;
25467        __struct.chan16_raw = buf.get_u16_le()?;
25468        __struct.chan17_raw = buf.get_u16_le()?;
25469        __struct.chan18_raw = buf.get_u16_le()?;
25470        Ok(__struct)
25471    }
25472    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25473        let mut __tmp = BytesMut::new(bytes);
25474        #[allow(clippy::absurd_extreme_comparisons)]
25475        #[allow(unused_comparisons)]
25476        if __tmp.remaining() < Self::ENCODED_LEN {
25477            panic!(
25478                "buffer is too small (need {} bytes, but got {})",
25479                Self::ENCODED_LEN,
25480                __tmp.remaining(),
25481            )
25482        }
25483        __tmp.put_u16_le(self.chan1_raw);
25484        __tmp.put_u16_le(self.chan2_raw);
25485        __tmp.put_u16_le(self.chan3_raw);
25486        __tmp.put_u16_le(self.chan4_raw);
25487        __tmp.put_u16_le(self.chan5_raw);
25488        __tmp.put_u16_le(self.chan6_raw);
25489        __tmp.put_u16_le(self.chan7_raw);
25490        __tmp.put_u16_le(self.chan8_raw);
25491        __tmp.put_u8(self.target_system);
25492        __tmp.put_u8(self.target_component);
25493        if matches!(version, MavlinkVersion::V2) {
25494            __tmp.put_u16_le(self.chan9_raw);
25495            __tmp.put_u16_le(self.chan10_raw);
25496            __tmp.put_u16_le(self.chan11_raw);
25497            __tmp.put_u16_le(self.chan12_raw);
25498            __tmp.put_u16_le(self.chan13_raw);
25499            __tmp.put_u16_le(self.chan14_raw);
25500            __tmp.put_u16_le(self.chan15_raw);
25501            __tmp.put_u16_le(self.chan16_raw);
25502            __tmp.put_u16_le(self.chan17_raw);
25503            __tmp.put_u16_le(self.chan18_raw);
25504            let len = __tmp.len();
25505            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25506        } else {
25507            __tmp.len()
25508        }
25509    }
25510}
25511#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25512#[doc = ""]
25513#[doc = "ID: 35"]
25514#[derive(Debug, Clone, PartialEq)]
25515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25517#[cfg_attr(feature = "ts", derive(TS))]
25518#[cfg_attr(feature = "ts", ts(export))]
25519pub struct RC_CHANNELS_RAW_DATA {
25520    #[doc = "Timestamp (time since system boot)."]
25521    pub time_boot_ms: u32,
25522    #[doc = "RC channel 1 value."]
25523    pub chan1_raw: u16,
25524    #[doc = "RC channel 2 value."]
25525    pub chan2_raw: u16,
25526    #[doc = "RC channel 3 value."]
25527    pub chan3_raw: u16,
25528    #[doc = "RC channel 4 value."]
25529    pub chan4_raw: u16,
25530    #[doc = "RC channel 5 value."]
25531    pub chan5_raw: u16,
25532    #[doc = "RC channel 6 value."]
25533    pub chan6_raw: u16,
25534    #[doc = "RC channel 7 value."]
25535    pub chan7_raw: u16,
25536    #[doc = "RC channel 8 value."]
25537    pub chan8_raw: u16,
25538    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25539    pub port: u8,
25540    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25541    pub rssi: u8,
25542}
25543impl RC_CHANNELS_RAW_DATA {
25544    pub const ENCODED_LEN: usize = 22usize;
25545    pub const DEFAULT: Self = Self {
25546        time_boot_ms: 0_u32,
25547        chan1_raw: 0_u16,
25548        chan2_raw: 0_u16,
25549        chan3_raw: 0_u16,
25550        chan4_raw: 0_u16,
25551        chan5_raw: 0_u16,
25552        chan6_raw: 0_u16,
25553        chan7_raw: 0_u16,
25554        chan8_raw: 0_u16,
25555        port: 0_u8,
25556        rssi: 0_u8,
25557    };
25558    #[cfg(feature = "arbitrary")]
25559    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25560        use arbitrary::{Arbitrary, Unstructured};
25561        let mut buf = [0u8; 1024];
25562        rng.fill_bytes(&mut buf);
25563        let mut unstructured = Unstructured::new(&buf);
25564        Self::arbitrary(&mut unstructured).unwrap_or_default()
25565    }
25566}
25567impl Default for RC_CHANNELS_RAW_DATA {
25568    fn default() -> Self {
25569        Self::DEFAULT.clone()
25570    }
25571}
25572impl MessageData for RC_CHANNELS_RAW_DATA {
25573    type Message = MavMessage;
25574    const ID: u32 = 35u32;
25575    const NAME: &'static str = "RC_CHANNELS_RAW";
25576    const EXTRA_CRC: u8 = 244u8;
25577    const ENCODED_LEN: usize = 22usize;
25578    fn deser(
25579        _version: MavlinkVersion,
25580        __input: &[u8],
25581    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25582        let avail_len = __input.len();
25583        let mut payload_buf = [0; Self::ENCODED_LEN];
25584        let mut buf = if avail_len < Self::ENCODED_LEN {
25585            payload_buf[0..avail_len].copy_from_slice(__input);
25586            Bytes::new(&payload_buf)
25587        } else {
25588            Bytes::new(__input)
25589        };
25590        let mut __struct = Self::default();
25591        __struct.time_boot_ms = buf.get_u32_le()?;
25592        __struct.chan1_raw = buf.get_u16_le()?;
25593        __struct.chan2_raw = buf.get_u16_le()?;
25594        __struct.chan3_raw = buf.get_u16_le()?;
25595        __struct.chan4_raw = buf.get_u16_le()?;
25596        __struct.chan5_raw = buf.get_u16_le()?;
25597        __struct.chan6_raw = buf.get_u16_le()?;
25598        __struct.chan7_raw = buf.get_u16_le()?;
25599        __struct.chan8_raw = buf.get_u16_le()?;
25600        __struct.port = buf.get_u8()?;
25601        __struct.rssi = buf.get_u8()?;
25602        Ok(__struct)
25603    }
25604    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25605        let mut __tmp = BytesMut::new(bytes);
25606        #[allow(clippy::absurd_extreme_comparisons)]
25607        #[allow(unused_comparisons)]
25608        if __tmp.remaining() < Self::ENCODED_LEN {
25609            panic!(
25610                "buffer is too small (need {} bytes, but got {})",
25611                Self::ENCODED_LEN,
25612                __tmp.remaining(),
25613            )
25614        }
25615        __tmp.put_u32_le(self.time_boot_ms);
25616        __tmp.put_u16_le(self.chan1_raw);
25617        __tmp.put_u16_le(self.chan2_raw);
25618        __tmp.put_u16_le(self.chan3_raw);
25619        __tmp.put_u16_le(self.chan4_raw);
25620        __tmp.put_u16_le(self.chan5_raw);
25621        __tmp.put_u16_le(self.chan6_raw);
25622        __tmp.put_u16_le(self.chan7_raw);
25623        __tmp.put_u16_le(self.chan8_raw);
25624        __tmp.put_u8(self.port);
25625        __tmp.put_u8(self.rssi);
25626        if matches!(version, MavlinkVersion::V2) {
25627            let len = __tmp.len();
25628            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25629        } else {
25630            __tmp.len()
25631        }
25632    }
25633}
25634#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25635#[doc = ""]
25636#[doc = "ID: 34"]
25637#[derive(Debug, Clone, PartialEq)]
25638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25639#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25640#[cfg_attr(feature = "ts", derive(TS))]
25641#[cfg_attr(feature = "ts", ts(export))]
25642pub struct RC_CHANNELS_SCALED_DATA {
25643    #[doc = "Timestamp (time since system boot)."]
25644    pub time_boot_ms: u32,
25645    #[doc = "RC channel 1 value scaled."]
25646    pub chan1_scaled: i16,
25647    #[doc = "RC channel 2 value scaled."]
25648    pub chan2_scaled: i16,
25649    #[doc = "RC channel 3 value scaled."]
25650    pub chan3_scaled: i16,
25651    #[doc = "RC channel 4 value scaled."]
25652    pub chan4_scaled: i16,
25653    #[doc = "RC channel 5 value scaled."]
25654    pub chan5_scaled: i16,
25655    #[doc = "RC channel 6 value scaled."]
25656    pub chan6_scaled: i16,
25657    #[doc = "RC channel 7 value scaled."]
25658    pub chan7_scaled: i16,
25659    #[doc = "RC channel 8 value scaled."]
25660    pub chan8_scaled: i16,
25661    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25662    pub port: u8,
25663    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25664    pub rssi: u8,
25665}
25666impl RC_CHANNELS_SCALED_DATA {
25667    pub const ENCODED_LEN: usize = 22usize;
25668    pub const DEFAULT: Self = Self {
25669        time_boot_ms: 0_u32,
25670        chan1_scaled: 0_i16,
25671        chan2_scaled: 0_i16,
25672        chan3_scaled: 0_i16,
25673        chan4_scaled: 0_i16,
25674        chan5_scaled: 0_i16,
25675        chan6_scaled: 0_i16,
25676        chan7_scaled: 0_i16,
25677        chan8_scaled: 0_i16,
25678        port: 0_u8,
25679        rssi: 0_u8,
25680    };
25681    #[cfg(feature = "arbitrary")]
25682    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25683        use arbitrary::{Arbitrary, Unstructured};
25684        let mut buf = [0u8; 1024];
25685        rng.fill_bytes(&mut buf);
25686        let mut unstructured = Unstructured::new(&buf);
25687        Self::arbitrary(&mut unstructured).unwrap_or_default()
25688    }
25689}
25690impl Default for RC_CHANNELS_SCALED_DATA {
25691    fn default() -> Self {
25692        Self::DEFAULT.clone()
25693    }
25694}
25695impl MessageData for RC_CHANNELS_SCALED_DATA {
25696    type Message = MavMessage;
25697    const ID: u32 = 34u32;
25698    const NAME: &'static str = "RC_CHANNELS_SCALED";
25699    const EXTRA_CRC: u8 = 237u8;
25700    const ENCODED_LEN: usize = 22usize;
25701    fn deser(
25702        _version: MavlinkVersion,
25703        __input: &[u8],
25704    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25705        let avail_len = __input.len();
25706        let mut payload_buf = [0; Self::ENCODED_LEN];
25707        let mut buf = if avail_len < Self::ENCODED_LEN {
25708            payload_buf[0..avail_len].copy_from_slice(__input);
25709            Bytes::new(&payload_buf)
25710        } else {
25711            Bytes::new(__input)
25712        };
25713        let mut __struct = Self::default();
25714        __struct.time_boot_ms = buf.get_u32_le()?;
25715        __struct.chan1_scaled = buf.get_i16_le()?;
25716        __struct.chan2_scaled = buf.get_i16_le()?;
25717        __struct.chan3_scaled = buf.get_i16_le()?;
25718        __struct.chan4_scaled = buf.get_i16_le()?;
25719        __struct.chan5_scaled = buf.get_i16_le()?;
25720        __struct.chan6_scaled = buf.get_i16_le()?;
25721        __struct.chan7_scaled = buf.get_i16_le()?;
25722        __struct.chan8_scaled = buf.get_i16_le()?;
25723        __struct.port = buf.get_u8()?;
25724        __struct.rssi = buf.get_u8()?;
25725        Ok(__struct)
25726    }
25727    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25728        let mut __tmp = BytesMut::new(bytes);
25729        #[allow(clippy::absurd_extreme_comparisons)]
25730        #[allow(unused_comparisons)]
25731        if __tmp.remaining() < Self::ENCODED_LEN {
25732            panic!(
25733                "buffer is too small (need {} bytes, but got {})",
25734                Self::ENCODED_LEN,
25735                __tmp.remaining(),
25736            )
25737        }
25738        __tmp.put_u32_le(self.time_boot_ms);
25739        __tmp.put_i16_le(self.chan1_scaled);
25740        __tmp.put_i16_le(self.chan2_scaled);
25741        __tmp.put_i16_le(self.chan3_scaled);
25742        __tmp.put_i16_le(self.chan4_scaled);
25743        __tmp.put_i16_le(self.chan5_scaled);
25744        __tmp.put_i16_le(self.chan6_scaled);
25745        __tmp.put_i16_le(self.chan7_scaled);
25746        __tmp.put_i16_le(self.chan8_scaled);
25747        __tmp.put_u8(self.port);
25748        __tmp.put_u8(self.rssi);
25749        if matches!(version, MavlinkVersion::V2) {
25750            let len = __tmp.len();
25751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25752        } else {
25753            __tmp.len()
25754        }
25755    }
25756}
25757#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25758#[doc = "Request a data stream."]
25759#[doc = ""]
25760#[doc = "ID: 66"]
25761#[derive(Debug, Clone, PartialEq)]
25762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25764#[cfg_attr(feature = "ts", derive(TS))]
25765#[cfg_attr(feature = "ts", ts(export))]
25766pub struct REQUEST_DATA_STREAM_DATA {
25767    #[doc = "The requested message rate"]
25768    pub req_message_rate: u16,
25769    #[doc = "The target requested to send the message stream."]
25770    pub target_system: u8,
25771    #[doc = "The target requested to send the message stream."]
25772    pub target_component: u8,
25773    #[doc = "The ID of the requested data stream"]
25774    pub req_stream_id: u8,
25775    #[doc = "1 to start sending, 0 to stop sending."]
25776    pub start_stop: u8,
25777}
25778impl REQUEST_DATA_STREAM_DATA {
25779    pub const ENCODED_LEN: usize = 6usize;
25780    pub const DEFAULT: Self = Self {
25781        req_message_rate: 0_u16,
25782        target_system: 0_u8,
25783        target_component: 0_u8,
25784        req_stream_id: 0_u8,
25785        start_stop: 0_u8,
25786    };
25787    #[cfg(feature = "arbitrary")]
25788    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25789        use arbitrary::{Arbitrary, Unstructured};
25790        let mut buf = [0u8; 1024];
25791        rng.fill_bytes(&mut buf);
25792        let mut unstructured = Unstructured::new(&buf);
25793        Self::arbitrary(&mut unstructured).unwrap_or_default()
25794    }
25795}
25796impl Default for REQUEST_DATA_STREAM_DATA {
25797    fn default() -> Self {
25798        Self::DEFAULT.clone()
25799    }
25800}
25801impl MessageData for REQUEST_DATA_STREAM_DATA {
25802    type Message = MavMessage;
25803    const ID: u32 = 66u32;
25804    const NAME: &'static str = "REQUEST_DATA_STREAM";
25805    const EXTRA_CRC: u8 = 148u8;
25806    const ENCODED_LEN: usize = 6usize;
25807    fn deser(
25808        _version: MavlinkVersion,
25809        __input: &[u8],
25810    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25811        let avail_len = __input.len();
25812        let mut payload_buf = [0; Self::ENCODED_LEN];
25813        let mut buf = if avail_len < Self::ENCODED_LEN {
25814            payload_buf[0..avail_len].copy_from_slice(__input);
25815            Bytes::new(&payload_buf)
25816        } else {
25817            Bytes::new(__input)
25818        };
25819        let mut __struct = Self::default();
25820        __struct.req_message_rate = buf.get_u16_le()?;
25821        __struct.target_system = buf.get_u8()?;
25822        __struct.target_component = buf.get_u8()?;
25823        __struct.req_stream_id = buf.get_u8()?;
25824        __struct.start_stop = buf.get_u8()?;
25825        Ok(__struct)
25826    }
25827    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25828        let mut __tmp = BytesMut::new(bytes);
25829        #[allow(clippy::absurd_extreme_comparisons)]
25830        #[allow(unused_comparisons)]
25831        if __tmp.remaining() < Self::ENCODED_LEN {
25832            panic!(
25833                "buffer is too small (need {} bytes, but got {})",
25834                Self::ENCODED_LEN,
25835                __tmp.remaining(),
25836            )
25837        }
25838        __tmp.put_u16_le(self.req_message_rate);
25839        __tmp.put_u8(self.target_system);
25840        __tmp.put_u8(self.target_component);
25841        __tmp.put_u8(self.req_stream_id);
25842        __tmp.put_u8(self.start_stop);
25843        if matches!(version, MavlinkVersion::V2) {
25844            let len = __tmp.len();
25845            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25846        } else {
25847            __tmp.len()
25848        }
25849    }
25850}
25851#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
25852#[doc = ""]
25853#[doc = "ID: 412"]
25854#[derive(Debug, Clone, PartialEq)]
25855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25857#[cfg_attr(feature = "ts", derive(TS))]
25858#[cfg_attr(feature = "ts", ts(export))]
25859pub struct REQUEST_EVENT_DATA {
25860    #[doc = "First sequence number of the requested event."]
25861    pub first_sequence: u16,
25862    #[doc = "Last sequence number of the requested event."]
25863    pub last_sequence: u16,
25864    #[doc = "System ID"]
25865    pub target_system: u8,
25866    #[doc = "Component ID"]
25867    pub target_component: u8,
25868}
25869impl REQUEST_EVENT_DATA {
25870    pub const ENCODED_LEN: usize = 6usize;
25871    pub const DEFAULT: Self = Self {
25872        first_sequence: 0_u16,
25873        last_sequence: 0_u16,
25874        target_system: 0_u8,
25875        target_component: 0_u8,
25876    };
25877    #[cfg(feature = "arbitrary")]
25878    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25879        use arbitrary::{Arbitrary, Unstructured};
25880        let mut buf = [0u8; 1024];
25881        rng.fill_bytes(&mut buf);
25882        let mut unstructured = Unstructured::new(&buf);
25883        Self::arbitrary(&mut unstructured).unwrap_or_default()
25884    }
25885}
25886impl Default for REQUEST_EVENT_DATA {
25887    fn default() -> Self {
25888        Self::DEFAULT.clone()
25889    }
25890}
25891impl MessageData for REQUEST_EVENT_DATA {
25892    type Message = MavMessage;
25893    const ID: u32 = 412u32;
25894    const NAME: &'static str = "REQUEST_EVENT";
25895    const EXTRA_CRC: u8 = 33u8;
25896    const ENCODED_LEN: usize = 6usize;
25897    fn deser(
25898        _version: MavlinkVersion,
25899        __input: &[u8],
25900    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25901        let avail_len = __input.len();
25902        let mut payload_buf = [0; Self::ENCODED_LEN];
25903        let mut buf = if avail_len < Self::ENCODED_LEN {
25904            payload_buf[0..avail_len].copy_from_slice(__input);
25905            Bytes::new(&payload_buf)
25906        } else {
25907            Bytes::new(__input)
25908        };
25909        let mut __struct = Self::default();
25910        __struct.first_sequence = buf.get_u16_le()?;
25911        __struct.last_sequence = buf.get_u16_le()?;
25912        __struct.target_system = buf.get_u8()?;
25913        __struct.target_component = buf.get_u8()?;
25914        Ok(__struct)
25915    }
25916    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25917        let mut __tmp = BytesMut::new(bytes);
25918        #[allow(clippy::absurd_extreme_comparisons)]
25919        #[allow(unused_comparisons)]
25920        if __tmp.remaining() < Self::ENCODED_LEN {
25921            panic!(
25922                "buffer is too small (need {} bytes, but got {})",
25923                Self::ENCODED_LEN,
25924                __tmp.remaining(),
25925            )
25926        }
25927        __tmp.put_u16_le(self.first_sequence);
25928        __tmp.put_u16_le(self.last_sequence);
25929        __tmp.put_u8(self.target_system);
25930        __tmp.put_u8(self.target_component);
25931        if matches!(version, MavlinkVersion::V2) {
25932            let len = __tmp.len();
25933            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25934        } else {
25935            __tmp.len()
25936        }
25937    }
25938}
25939#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
25940#[doc = ""]
25941#[doc = "ID: 142"]
25942#[derive(Debug, Clone, PartialEq)]
25943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25945#[cfg_attr(feature = "ts", derive(TS))]
25946#[cfg_attr(feature = "ts", ts(export))]
25947pub struct RESOURCE_REQUEST_DATA {
25948    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
25949    pub request_id: u8,
25950    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
25951    pub uri_type: u8,
25952    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
25953    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25954    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25955    pub uri: [u8; 120],
25956    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
25957    pub transfer_type: u8,
25958    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
25959    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25960    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25961    pub storage: [u8; 120],
25962}
25963impl RESOURCE_REQUEST_DATA {
25964    pub const ENCODED_LEN: usize = 243usize;
25965    pub const DEFAULT: Self = Self {
25966        request_id: 0_u8,
25967        uri_type: 0_u8,
25968        uri: [0_u8; 120usize],
25969        transfer_type: 0_u8,
25970        storage: [0_u8; 120usize],
25971    };
25972    #[cfg(feature = "arbitrary")]
25973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25974        use arbitrary::{Arbitrary, Unstructured};
25975        let mut buf = [0u8; 1024];
25976        rng.fill_bytes(&mut buf);
25977        let mut unstructured = Unstructured::new(&buf);
25978        Self::arbitrary(&mut unstructured).unwrap_or_default()
25979    }
25980}
25981impl Default for RESOURCE_REQUEST_DATA {
25982    fn default() -> Self {
25983        Self::DEFAULT.clone()
25984    }
25985}
25986impl MessageData for RESOURCE_REQUEST_DATA {
25987    type Message = MavMessage;
25988    const ID: u32 = 142u32;
25989    const NAME: &'static str = "RESOURCE_REQUEST";
25990    const EXTRA_CRC: u8 = 72u8;
25991    const ENCODED_LEN: usize = 243usize;
25992    fn deser(
25993        _version: MavlinkVersion,
25994        __input: &[u8],
25995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25996        let avail_len = __input.len();
25997        let mut payload_buf = [0; Self::ENCODED_LEN];
25998        let mut buf = if avail_len < Self::ENCODED_LEN {
25999            payload_buf[0..avail_len].copy_from_slice(__input);
26000            Bytes::new(&payload_buf)
26001        } else {
26002            Bytes::new(__input)
26003        };
26004        let mut __struct = Self::default();
26005        __struct.request_id = buf.get_u8()?;
26006        __struct.uri_type = buf.get_u8()?;
26007        for v in &mut __struct.uri {
26008            let val = buf.get_u8()?;
26009            *v = val;
26010        }
26011        __struct.transfer_type = buf.get_u8()?;
26012        for v in &mut __struct.storage {
26013            let val = buf.get_u8()?;
26014            *v = val;
26015        }
26016        Ok(__struct)
26017    }
26018    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26019        let mut __tmp = BytesMut::new(bytes);
26020        #[allow(clippy::absurd_extreme_comparisons)]
26021        #[allow(unused_comparisons)]
26022        if __tmp.remaining() < Self::ENCODED_LEN {
26023            panic!(
26024                "buffer is too small (need {} bytes, but got {})",
26025                Self::ENCODED_LEN,
26026                __tmp.remaining(),
26027            )
26028        }
26029        __tmp.put_u8(self.request_id);
26030        __tmp.put_u8(self.uri_type);
26031        for val in &self.uri {
26032            __tmp.put_u8(*val);
26033        }
26034        __tmp.put_u8(self.transfer_type);
26035        for val in &self.storage {
26036            __tmp.put_u8(*val);
26037        }
26038        if matches!(version, MavlinkVersion::V2) {
26039            let len = __tmp.len();
26040            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26041        } else {
26042            __tmp.len()
26043        }
26044    }
26045}
26046#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26047#[doc = ""]
26048#[doc = "ID: 413"]
26049#[derive(Debug, Clone, PartialEq)]
26050#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26051#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26052#[cfg_attr(feature = "ts", derive(TS))]
26053#[cfg_attr(feature = "ts", ts(export))]
26054pub struct RESPONSE_EVENT_ERROR_DATA {
26055    #[doc = "Sequence number."]
26056    pub sequence: u16,
26057    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26058    pub sequence_oldest_available: u16,
26059    #[doc = "System ID"]
26060    pub target_system: u8,
26061    #[doc = "Component ID"]
26062    pub target_component: u8,
26063    #[doc = "Error reason."]
26064    pub reason: MavEventErrorReason,
26065}
26066impl RESPONSE_EVENT_ERROR_DATA {
26067    pub const ENCODED_LEN: usize = 7usize;
26068    pub const DEFAULT: Self = Self {
26069        sequence: 0_u16,
26070        sequence_oldest_available: 0_u16,
26071        target_system: 0_u8,
26072        target_component: 0_u8,
26073        reason: MavEventErrorReason::DEFAULT,
26074    };
26075    #[cfg(feature = "arbitrary")]
26076    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26077        use arbitrary::{Arbitrary, Unstructured};
26078        let mut buf = [0u8; 1024];
26079        rng.fill_bytes(&mut buf);
26080        let mut unstructured = Unstructured::new(&buf);
26081        Self::arbitrary(&mut unstructured).unwrap_or_default()
26082    }
26083}
26084impl Default for RESPONSE_EVENT_ERROR_DATA {
26085    fn default() -> Self {
26086        Self::DEFAULT.clone()
26087    }
26088}
26089impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26090    type Message = MavMessage;
26091    const ID: u32 = 413u32;
26092    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26093    const EXTRA_CRC: u8 = 77u8;
26094    const ENCODED_LEN: usize = 7usize;
26095    fn deser(
26096        _version: MavlinkVersion,
26097        __input: &[u8],
26098    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26099        let avail_len = __input.len();
26100        let mut payload_buf = [0; Self::ENCODED_LEN];
26101        let mut buf = if avail_len < Self::ENCODED_LEN {
26102            payload_buf[0..avail_len].copy_from_slice(__input);
26103            Bytes::new(&payload_buf)
26104        } else {
26105            Bytes::new(__input)
26106        };
26107        let mut __struct = Self::default();
26108        __struct.sequence = buf.get_u16_le()?;
26109        __struct.sequence_oldest_available = buf.get_u16_le()?;
26110        __struct.target_system = buf.get_u8()?;
26111        __struct.target_component = buf.get_u8()?;
26112        let tmp = buf.get_u8()?;
26113        __struct.reason =
26114            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26115                enum_type: "MavEventErrorReason",
26116                value: tmp as u64,
26117            })?;
26118        Ok(__struct)
26119    }
26120    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26121        let mut __tmp = BytesMut::new(bytes);
26122        #[allow(clippy::absurd_extreme_comparisons)]
26123        #[allow(unused_comparisons)]
26124        if __tmp.remaining() < Self::ENCODED_LEN {
26125            panic!(
26126                "buffer is too small (need {} bytes, but got {})",
26127                Self::ENCODED_LEN,
26128                __tmp.remaining(),
26129            )
26130        }
26131        __tmp.put_u16_le(self.sequence);
26132        __tmp.put_u16_le(self.sequence_oldest_available);
26133        __tmp.put_u8(self.target_system);
26134        __tmp.put_u8(self.target_component);
26135        __tmp.put_u8(self.reason as u8);
26136        if matches!(version, MavlinkVersion::V2) {
26137            let len = __tmp.len();
26138            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26139        } else {
26140            __tmp.len()
26141        }
26142    }
26143}
26144#[doc = "Read out the safety zone the MAV currently assumes."]
26145#[doc = ""]
26146#[doc = "ID: 55"]
26147#[derive(Debug, Clone, PartialEq)]
26148#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26150#[cfg_attr(feature = "ts", derive(TS))]
26151#[cfg_attr(feature = "ts", ts(export))]
26152pub struct SAFETY_ALLOWED_AREA_DATA {
26153    #[doc = "x position 1 / Latitude 1"]
26154    pub p1x: f32,
26155    #[doc = "y position 1 / Longitude 1"]
26156    pub p1y: f32,
26157    #[doc = "z position 1 / Altitude 1"]
26158    pub p1z: f32,
26159    #[doc = "x position 2 / Latitude 2"]
26160    pub p2x: f32,
26161    #[doc = "y position 2 / Longitude 2"]
26162    pub p2y: f32,
26163    #[doc = "z position 2 / Altitude 2"]
26164    pub p2z: f32,
26165    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26166    pub frame: MavFrame,
26167}
26168impl SAFETY_ALLOWED_AREA_DATA {
26169    pub const ENCODED_LEN: usize = 25usize;
26170    pub const DEFAULT: Self = Self {
26171        p1x: 0.0_f32,
26172        p1y: 0.0_f32,
26173        p1z: 0.0_f32,
26174        p2x: 0.0_f32,
26175        p2y: 0.0_f32,
26176        p2z: 0.0_f32,
26177        frame: MavFrame::DEFAULT,
26178    };
26179    #[cfg(feature = "arbitrary")]
26180    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26181        use arbitrary::{Arbitrary, Unstructured};
26182        let mut buf = [0u8; 1024];
26183        rng.fill_bytes(&mut buf);
26184        let mut unstructured = Unstructured::new(&buf);
26185        Self::arbitrary(&mut unstructured).unwrap_or_default()
26186    }
26187}
26188impl Default for SAFETY_ALLOWED_AREA_DATA {
26189    fn default() -> Self {
26190        Self::DEFAULT.clone()
26191    }
26192}
26193impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26194    type Message = MavMessage;
26195    const ID: u32 = 55u32;
26196    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26197    const EXTRA_CRC: u8 = 3u8;
26198    const ENCODED_LEN: usize = 25usize;
26199    fn deser(
26200        _version: MavlinkVersion,
26201        __input: &[u8],
26202    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26203        let avail_len = __input.len();
26204        let mut payload_buf = [0; Self::ENCODED_LEN];
26205        let mut buf = if avail_len < Self::ENCODED_LEN {
26206            payload_buf[0..avail_len].copy_from_slice(__input);
26207            Bytes::new(&payload_buf)
26208        } else {
26209            Bytes::new(__input)
26210        };
26211        let mut __struct = Self::default();
26212        __struct.p1x = buf.get_f32_le()?;
26213        __struct.p1y = buf.get_f32_le()?;
26214        __struct.p1z = buf.get_f32_le()?;
26215        __struct.p2x = buf.get_f32_le()?;
26216        __struct.p2y = buf.get_f32_le()?;
26217        __struct.p2z = buf.get_f32_le()?;
26218        let tmp = buf.get_u8()?;
26219        __struct.frame =
26220            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26221                enum_type: "MavFrame",
26222                value: tmp as u64,
26223            })?;
26224        Ok(__struct)
26225    }
26226    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26227        let mut __tmp = BytesMut::new(bytes);
26228        #[allow(clippy::absurd_extreme_comparisons)]
26229        #[allow(unused_comparisons)]
26230        if __tmp.remaining() < Self::ENCODED_LEN {
26231            panic!(
26232                "buffer is too small (need {} bytes, but got {})",
26233                Self::ENCODED_LEN,
26234                __tmp.remaining(),
26235            )
26236        }
26237        __tmp.put_f32_le(self.p1x);
26238        __tmp.put_f32_le(self.p1y);
26239        __tmp.put_f32_le(self.p1z);
26240        __tmp.put_f32_le(self.p2x);
26241        __tmp.put_f32_le(self.p2y);
26242        __tmp.put_f32_le(self.p2z);
26243        __tmp.put_u8(self.frame as u8);
26244        if matches!(version, MavlinkVersion::V2) {
26245            let len = __tmp.len();
26246            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26247        } else {
26248            __tmp.len()
26249        }
26250    }
26251}
26252#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26253#[doc = ""]
26254#[doc = "ID: 54"]
26255#[derive(Debug, Clone, PartialEq)]
26256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26258#[cfg_attr(feature = "ts", derive(TS))]
26259#[cfg_attr(feature = "ts", ts(export))]
26260pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26261    #[doc = "x position 1 / Latitude 1"]
26262    pub p1x: f32,
26263    #[doc = "y position 1 / Longitude 1"]
26264    pub p1y: f32,
26265    #[doc = "z position 1 / Altitude 1"]
26266    pub p1z: f32,
26267    #[doc = "x position 2 / Latitude 2"]
26268    pub p2x: f32,
26269    #[doc = "y position 2 / Longitude 2"]
26270    pub p2y: f32,
26271    #[doc = "z position 2 / Altitude 2"]
26272    pub p2z: f32,
26273    #[doc = "System ID"]
26274    pub target_system: u8,
26275    #[doc = "Component ID"]
26276    pub target_component: u8,
26277    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26278    pub frame: MavFrame,
26279}
26280impl SAFETY_SET_ALLOWED_AREA_DATA {
26281    pub const ENCODED_LEN: usize = 27usize;
26282    pub const DEFAULT: Self = Self {
26283        p1x: 0.0_f32,
26284        p1y: 0.0_f32,
26285        p1z: 0.0_f32,
26286        p2x: 0.0_f32,
26287        p2y: 0.0_f32,
26288        p2z: 0.0_f32,
26289        target_system: 0_u8,
26290        target_component: 0_u8,
26291        frame: MavFrame::DEFAULT,
26292    };
26293    #[cfg(feature = "arbitrary")]
26294    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26295        use arbitrary::{Arbitrary, Unstructured};
26296        let mut buf = [0u8; 1024];
26297        rng.fill_bytes(&mut buf);
26298        let mut unstructured = Unstructured::new(&buf);
26299        Self::arbitrary(&mut unstructured).unwrap_or_default()
26300    }
26301}
26302impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26303    fn default() -> Self {
26304        Self::DEFAULT.clone()
26305    }
26306}
26307impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26308    type Message = MavMessage;
26309    const ID: u32 = 54u32;
26310    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26311    const EXTRA_CRC: u8 = 15u8;
26312    const ENCODED_LEN: usize = 27usize;
26313    fn deser(
26314        _version: MavlinkVersion,
26315        __input: &[u8],
26316    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26317        let avail_len = __input.len();
26318        let mut payload_buf = [0; Self::ENCODED_LEN];
26319        let mut buf = if avail_len < Self::ENCODED_LEN {
26320            payload_buf[0..avail_len].copy_from_slice(__input);
26321            Bytes::new(&payload_buf)
26322        } else {
26323            Bytes::new(__input)
26324        };
26325        let mut __struct = Self::default();
26326        __struct.p1x = buf.get_f32_le()?;
26327        __struct.p1y = buf.get_f32_le()?;
26328        __struct.p1z = buf.get_f32_le()?;
26329        __struct.p2x = buf.get_f32_le()?;
26330        __struct.p2y = buf.get_f32_le()?;
26331        __struct.p2z = buf.get_f32_le()?;
26332        __struct.target_system = buf.get_u8()?;
26333        __struct.target_component = buf.get_u8()?;
26334        let tmp = buf.get_u8()?;
26335        __struct.frame =
26336            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26337                enum_type: "MavFrame",
26338                value: tmp as u64,
26339            })?;
26340        Ok(__struct)
26341    }
26342    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26343        let mut __tmp = BytesMut::new(bytes);
26344        #[allow(clippy::absurd_extreme_comparisons)]
26345        #[allow(unused_comparisons)]
26346        if __tmp.remaining() < Self::ENCODED_LEN {
26347            panic!(
26348                "buffer is too small (need {} bytes, but got {})",
26349                Self::ENCODED_LEN,
26350                __tmp.remaining(),
26351            )
26352        }
26353        __tmp.put_f32_le(self.p1x);
26354        __tmp.put_f32_le(self.p1y);
26355        __tmp.put_f32_le(self.p1z);
26356        __tmp.put_f32_le(self.p2x);
26357        __tmp.put_f32_le(self.p2y);
26358        __tmp.put_f32_le(self.p2z);
26359        __tmp.put_u8(self.target_system);
26360        __tmp.put_u8(self.target_component);
26361        __tmp.put_u8(self.frame as u8);
26362        if matches!(version, MavlinkVersion::V2) {
26363            let len = __tmp.len();
26364            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26365        } else {
26366            __tmp.len()
26367        }
26368    }
26369}
26370#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26371#[doc = ""]
26372#[doc = "ID: 26"]
26373#[derive(Debug, Clone, PartialEq)]
26374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26376#[cfg_attr(feature = "ts", derive(TS))]
26377#[cfg_attr(feature = "ts", ts(export))]
26378pub struct SCALED_IMU_DATA {
26379    #[doc = "Timestamp (time since system boot)."]
26380    pub time_boot_ms: u32,
26381    #[doc = "X acceleration"]
26382    pub xacc: i16,
26383    #[doc = "Y acceleration"]
26384    pub yacc: i16,
26385    #[doc = "Z acceleration"]
26386    pub zacc: i16,
26387    #[doc = "Angular speed around X axis"]
26388    pub xgyro: i16,
26389    #[doc = "Angular speed around Y axis"]
26390    pub ygyro: i16,
26391    #[doc = "Angular speed around Z axis"]
26392    pub zgyro: i16,
26393    #[doc = "X Magnetic field"]
26394    pub xmag: i16,
26395    #[doc = "Y Magnetic field"]
26396    pub ymag: i16,
26397    #[doc = "Z Magnetic field"]
26398    pub zmag: i16,
26399    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26400    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26401    pub temperature: i16,
26402}
26403impl SCALED_IMU_DATA {
26404    pub const ENCODED_LEN: usize = 24usize;
26405    pub const DEFAULT: Self = Self {
26406        time_boot_ms: 0_u32,
26407        xacc: 0_i16,
26408        yacc: 0_i16,
26409        zacc: 0_i16,
26410        xgyro: 0_i16,
26411        ygyro: 0_i16,
26412        zgyro: 0_i16,
26413        xmag: 0_i16,
26414        ymag: 0_i16,
26415        zmag: 0_i16,
26416        temperature: 0_i16,
26417    };
26418    #[cfg(feature = "arbitrary")]
26419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26420        use arbitrary::{Arbitrary, Unstructured};
26421        let mut buf = [0u8; 1024];
26422        rng.fill_bytes(&mut buf);
26423        let mut unstructured = Unstructured::new(&buf);
26424        Self::arbitrary(&mut unstructured).unwrap_or_default()
26425    }
26426}
26427impl Default for SCALED_IMU_DATA {
26428    fn default() -> Self {
26429        Self::DEFAULT.clone()
26430    }
26431}
26432impl MessageData for SCALED_IMU_DATA {
26433    type Message = MavMessage;
26434    const ID: u32 = 26u32;
26435    const NAME: &'static str = "SCALED_IMU";
26436    const EXTRA_CRC: u8 = 170u8;
26437    const ENCODED_LEN: usize = 24usize;
26438    fn deser(
26439        _version: MavlinkVersion,
26440        __input: &[u8],
26441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26442        let avail_len = __input.len();
26443        let mut payload_buf = [0; Self::ENCODED_LEN];
26444        let mut buf = if avail_len < Self::ENCODED_LEN {
26445            payload_buf[0..avail_len].copy_from_slice(__input);
26446            Bytes::new(&payload_buf)
26447        } else {
26448            Bytes::new(__input)
26449        };
26450        let mut __struct = Self::default();
26451        __struct.time_boot_ms = buf.get_u32_le()?;
26452        __struct.xacc = buf.get_i16_le()?;
26453        __struct.yacc = buf.get_i16_le()?;
26454        __struct.zacc = buf.get_i16_le()?;
26455        __struct.xgyro = buf.get_i16_le()?;
26456        __struct.ygyro = buf.get_i16_le()?;
26457        __struct.zgyro = buf.get_i16_le()?;
26458        __struct.xmag = buf.get_i16_le()?;
26459        __struct.ymag = buf.get_i16_le()?;
26460        __struct.zmag = buf.get_i16_le()?;
26461        __struct.temperature = buf.get_i16_le()?;
26462        Ok(__struct)
26463    }
26464    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26465        let mut __tmp = BytesMut::new(bytes);
26466        #[allow(clippy::absurd_extreme_comparisons)]
26467        #[allow(unused_comparisons)]
26468        if __tmp.remaining() < Self::ENCODED_LEN {
26469            panic!(
26470                "buffer is too small (need {} bytes, but got {})",
26471                Self::ENCODED_LEN,
26472                __tmp.remaining(),
26473            )
26474        }
26475        __tmp.put_u32_le(self.time_boot_ms);
26476        __tmp.put_i16_le(self.xacc);
26477        __tmp.put_i16_le(self.yacc);
26478        __tmp.put_i16_le(self.zacc);
26479        __tmp.put_i16_le(self.xgyro);
26480        __tmp.put_i16_le(self.ygyro);
26481        __tmp.put_i16_le(self.zgyro);
26482        __tmp.put_i16_le(self.xmag);
26483        __tmp.put_i16_le(self.ymag);
26484        __tmp.put_i16_le(self.zmag);
26485        if matches!(version, MavlinkVersion::V2) {
26486            __tmp.put_i16_le(self.temperature);
26487            let len = __tmp.len();
26488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26489        } else {
26490            __tmp.len()
26491        }
26492    }
26493}
26494#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26495#[doc = ""]
26496#[doc = "ID: 116"]
26497#[derive(Debug, Clone, PartialEq)]
26498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26500#[cfg_attr(feature = "ts", derive(TS))]
26501#[cfg_attr(feature = "ts", ts(export))]
26502pub struct SCALED_IMU2_DATA {
26503    #[doc = "Timestamp (time since system boot)."]
26504    pub time_boot_ms: u32,
26505    #[doc = "X acceleration"]
26506    pub xacc: i16,
26507    #[doc = "Y acceleration"]
26508    pub yacc: i16,
26509    #[doc = "Z acceleration"]
26510    pub zacc: i16,
26511    #[doc = "Angular speed around X axis"]
26512    pub xgyro: i16,
26513    #[doc = "Angular speed around Y axis"]
26514    pub ygyro: i16,
26515    #[doc = "Angular speed around Z axis"]
26516    pub zgyro: i16,
26517    #[doc = "X Magnetic field"]
26518    pub xmag: i16,
26519    #[doc = "Y Magnetic field"]
26520    pub ymag: i16,
26521    #[doc = "Z Magnetic field"]
26522    pub zmag: i16,
26523    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26524    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26525    pub temperature: i16,
26526}
26527impl SCALED_IMU2_DATA {
26528    pub const ENCODED_LEN: usize = 24usize;
26529    pub const DEFAULT: Self = Self {
26530        time_boot_ms: 0_u32,
26531        xacc: 0_i16,
26532        yacc: 0_i16,
26533        zacc: 0_i16,
26534        xgyro: 0_i16,
26535        ygyro: 0_i16,
26536        zgyro: 0_i16,
26537        xmag: 0_i16,
26538        ymag: 0_i16,
26539        zmag: 0_i16,
26540        temperature: 0_i16,
26541    };
26542    #[cfg(feature = "arbitrary")]
26543    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26544        use arbitrary::{Arbitrary, Unstructured};
26545        let mut buf = [0u8; 1024];
26546        rng.fill_bytes(&mut buf);
26547        let mut unstructured = Unstructured::new(&buf);
26548        Self::arbitrary(&mut unstructured).unwrap_or_default()
26549    }
26550}
26551impl Default for SCALED_IMU2_DATA {
26552    fn default() -> Self {
26553        Self::DEFAULT.clone()
26554    }
26555}
26556impl MessageData for SCALED_IMU2_DATA {
26557    type Message = MavMessage;
26558    const ID: u32 = 116u32;
26559    const NAME: &'static str = "SCALED_IMU2";
26560    const EXTRA_CRC: u8 = 76u8;
26561    const ENCODED_LEN: usize = 24usize;
26562    fn deser(
26563        _version: MavlinkVersion,
26564        __input: &[u8],
26565    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26566        let avail_len = __input.len();
26567        let mut payload_buf = [0; Self::ENCODED_LEN];
26568        let mut buf = if avail_len < Self::ENCODED_LEN {
26569            payload_buf[0..avail_len].copy_from_slice(__input);
26570            Bytes::new(&payload_buf)
26571        } else {
26572            Bytes::new(__input)
26573        };
26574        let mut __struct = Self::default();
26575        __struct.time_boot_ms = buf.get_u32_le()?;
26576        __struct.xacc = buf.get_i16_le()?;
26577        __struct.yacc = buf.get_i16_le()?;
26578        __struct.zacc = buf.get_i16_le()?;
26579        __struct.xgyro = buf.get_i16_le()?;
26580        __struct.ygyro = buf.get_i16_le()?;
26581        __struct.zgyro = buf.get_i16_le()?;
26582        __struct.xmag = buf.get_i16_le()?;
26583        __struct.ymag = buf.get_i16_le()?;
26584        __struct.zmag = buf.get_i16_le()?;
26585        __struct.temperature = buf.get_i16_le()?;
26586        Ok(__struct)
26587    }
26588    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26589        let mut __tmp = BytesMut::new(bytes);
26590        #[allow(clippy::absurd_extreme_comparisons)]
26591        #[allow(unused_comparisons)]
26592        if __tmp.remaining() < Self::ENCODED_LEN {
26593            panic!(
26594                "buffer is too small (need {} bytes, but got {})",
26595                Self::ENCODED_LEN,
26596                __tmp.remaining(),
26597            )
26598        }
26599        __tmp.put_u32_le(self.time_boot_ms);
26600        __tmp.put_i16_le(self.xacc);
26601        __tmp.put_i16_le(self.yacc);
26602        __tmp.put_i16_le(self.zacc);
26603        __tmp.put_i16_le(self.xgyro);
26604        __tmp.put_i16_le(self.ygyro);
26605        __tmp.put_i16_le(self.zgyro);
26606        __tmp.put_i16_le(self.xmag);
26607        __tmp.put_i16_le(self.ymag);
26608        __tmp.put_i16_le(self.zmag);
26609        if matches!(version, MavlinkVersion::V2) {
26610            __tmp.put_i16_le(self.temperature);
26611            let len = __tmp.len();
26612            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26613        } else {
26614            __tmp.len()
26615        }
26616    }
26617}
26618#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26619#[doc = ""]
26620#[doc = "ID: 129"]
26621#[derive(Debug, Clone, PartialEq)]
26622#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26623#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26624#[cfg_attr(feature = "ts", derive(TS))]
26625#[cfg_attr(feature = "ts", ts(export))]
26626pub struct SCALED_IMU3_DATA {
26627    #[doc = "Timestamp (time since system boot)."]
26628    pub time_boot_ms: u32,
26629    #[doc = "X acceleration"]
26630    pub xacc: i16,
26631    #[doc = "Y acceleration"]
26632    pub yacc: i16,
26633    #[doc = "Z acceleration"]
26634    pub zacc: i16,
26635    #[doc = "Angular speed around X axis"]
26636    pub xgyro: i16,
26637    #[doc = "Angular speed around Y axis"]
26638    pub ygyro: i16,
26639    #[doc = "Angular speed around Z axis"]
26640    pub zgyro: i16,
26641    #[doc = "X Magnetic field"]
26642    pub xmag: i16,
26643    #[doc = "Y Magnetic field"]
26644    pub ymag: i16,
26645    #[doc = "Z Magnetic field"]
26646    pub zmag: i16,
26647    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26648    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26649    pub temperature: i16,
26650}
26651impl SCALED_IMU3_DATA {
26652    pub const ENCODED_LEN: usize = 24usize;
26653    pub const DEFAULT: Self = Self {
26654        time_boot_ms: 0_u32,
26655        xacc: 0_i16,
26656        yacc: 0_i16,
26657        zacc: 0_i16,
26658        xgyro: 0_i16,
26659        ygyro: 0_i16,
26660        zgyro: 0_i16,
26661        xmag: 0_i16,
26662        ymag: 0_i16,
26663        zmag: 0_i16,
26664        temperature: 0_i16,
26665    };
26666    #[cfg(feature = "arbitrary")]
26667    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26668        use arbitrary::{Arbitrary, Unstructured};
26669        let mut buf = [0u8; 1024];
26670        rng.fill_bytes(&mut buf);
26671        let mut unstructured = Unstructured::new(&buf);
26672        Self::arbitrary(&mut unstructured).unwrap_or_default()
26673    }
26674}
26675impl Default for SCALED_IMU3_DATA {
26676    fn default() -> Self {
26677        Self::DEFAULT.clone()
26678    }
26679}
26680impl MessageData for SCALED_IMU3_DATA {
26681    type Message = MavMessage;
26682    const ID: u32 = 129u32;
26683    const NAME: &'static str = "SCALED_IMU3";
26684    const EXTRA_CRC: u8 = 46u8;
26685    const ENCODED_LEN: usize = 24usize;
26686    fn deser(
26687        _version: MavlinkVersion,
26688        __input: &[u8],
26689    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26690        let avail_len = __input.len();
26691        let mut payload_buf = [0; Self::ENCODED_LEN];
26692        let mut buf = if avail_len < Self::ENCODED_LEN {
26693            payload_buf[0..avail_len].copy_from_slice(__input);
26694            Bytes::new(&payload_buf)
26695        } else {
26696            Bytes::new(__input)
26697        };
26698        let mut __struct = Self::default();
26699        __struct.time_boot_ms = buf.get_u32_le()?;
26700        __struct.xacc = buf.get_i16_le()?;
26701        __struct.yacc = buf.get_i16_le()?;
26702        __struct.zacc = buf.get_i16_le()?;
26703        __struct.xgyro = buf.get_i16_le()?;
26704        __struct.ygyro = buf.get_i16_le()?;
26705        __struct.zgyro = buf.get_i16_le()?;
26706        __struct.xmag = buf.get_i16_le()?;
26707        __struct.ymag = buf.get_i16_le()?;
26708        __struct.zmag = buf.get_i16_le()?;
26709        __struct.temperature = buf.get_i16_le()?;
26710        Ok(__struct)
26711    }
26712    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26713        let mut __tmp = BytesMut::new(bytes);
26714        #[allow(clippy::absurd_extreme_comparisons)]
26715        #[allow(unused_comparisons)]
26716        if __tmp.remaining() < Self::ENCODED_LEN {
26717            panic!(
26718                "buffer is too small (need {} bytes, but got {})",
26719                Self::ENCODED_LEN,
26720                __tmp.remaining(),
26721            )
26722        }
26723        __tmp.put_u32_le(self.time_boot_ms);
26724        __tmp.put_i16_le(self.xacc);
26725        __tmp.put_i16_le(self.yacc);
26726        __tmp.put_i16_le(self.zacc);
26727        __tmp.put_i16_le(self.xgyro);
26728        __tmp.put_i16_le(self.ygyro);
26729        __tmp.put_i16_le(self.zgyro);
26730        __tmp.put_i16_le(self.xmag);
26731        __tmp.put_i16_le(self.ymag);
26732        __tmp.put_i16_le(self.zmag);
26733        if matches!(version, MavlinkVersion::V2) {
26734            __tmp.put_i16_le(self.temperature);
26735            let len = __tmp.len();
26736            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26737        } else {
26738            __tmp.len()
26739        }
26740    }
26741}
26742#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26743#[doc = ""]
26744#[doc = "ID: 29"]
26745#[derive(Debug, Clone, PartialEq)]
26746#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26747#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26748#[cfg_attr(feature = "ts", derive(TS))]
26749#[cfg_attr(feature = "ts", ts(export))]
26750pub struct SCALED_PRESSURE_DATA {
26751    #[doc = "Timestamp (time since system boot)."]
26752    pub time_boot_ms: u32,
26753    #[doc = "Absolute pressure"]
26754    pub press_abs: f32,
26755    #[doc = "Differential pressure 1"]
26756    pub press_diff: f32,
26757    #[doc = "Absolute pressure temperature"]
26758    pub temperature: i16,
26759    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26760    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26761    pub temperature_press_diff: i16,
26762}
26763impl SCALED_PRESSURE_DATA {
26764    pub const ENCODED_LEN: usize = 16usize;
26765    pub const DEFAULT: Self = Self {
26766        time_boot_ms: 0_u32,
26767        press_abs: 0.0_f32,
26768        press_diff: 0.0_f32,
26769        temperature: 0_i16,
26770        temperature_press_diff: 0_i16,
26771    };
26772    #[cfg(feature = "arbitrary")]
26773    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26774        use arbitrary::{Arbitrary, Unstructured};
26775        let mut buf = [0u8; 1024];
26776        rng.fill_bytes(&mut buf);
26777        let mut unstructured = Unstructured::new(&buf);
26778        Self::arbitrary(&mut unstructured).unwrap_or_default()
26779    }
26780}
26781impl Default for SCALED_PRESSURE_DATA {
26782    fn default() -> Self {
26783        Self::DEFAULT.clone()
26784    }
26785}
26786impl MessageData for SCALED_PRESSURE_DATA {
26787    type Message = MavMessage;
26788    const ID: u32 = 29u32;
26789    const NAME: &'static str = "SCALED_PRESSURE";
26790    const EXTRA_CRC: u8 = 115u8;
26791    const ENCODED_LEN: usize = 16usize;
26792    fn deser(
26793        _version: MavlinkVersion,
26794        __input: &[u8],
26795    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26796        let avail_len = __input.len();
26797        let mut payload_buf = [0; Self::ENCODED_LEN];
26798        let mut buf = if avail_len < Self::ENCODED_LEN {
26799            payload_buf[0..avail_len].copy_from_slice(__input);
26800            Bytes::new(&payload_buf)
26801        } else {
26802            Bytes::new(__input)
26803        };
26804        let mut __struct = Self::default();
26805        __struct.time_boot_ms = buf.get_u32_le()?;
26806        __struct.press_abs = buf.get_f32_le()?;
26807        __struct.press_diff = buf.get_f32_le()?;
26808        __struct.temperature = buf.get_i16_le()?;
26809        __struct.temperature_press_diff = buf.get_i16_le()?;
26810        Ok(__struct)
26811    }
26812    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26813        let mut __tmp = BytesMut::new(bytes);
26814        #[allow(clippy::absurd_extreme_comparisons)]
26815        #[allow(unused_comparisons)]
26816        if __tmp.remaining() < Self::ENCODED_LEN {
26817            panic!(
26818                "buffer is too small (need {} bytes, but got {})",
26819                Self::ENCODED_LEN,
26820                __tmp.remaining(),
26821            )
26822        }
26823        __tmp.put_u32_le(self.time_boot_ms);
26824        __tmp.put_f32_le(self.press_abs);
26825        __tmp.put_f32_le(self.press_diff);
26826        __tmp.put_i16_le(self.temperature);
26827        if matches!(version, MavlinkVersion::V2) {
26828            __tmp.put_i16_le(self.temperature_press_diff);
26829            let len = __tmp.len();
26830            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26831        } else {
26832            __tmp.len()
26833        }
26834    }
26835}
26836#[doc = "Barometer readings for 2nd barometer."]
26837#[doc = ""]
26838#[doc = "ID: 137"]
26839#[derive(Debug, Clone, PartialEq)]
26840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26842#[cfg_attr(feature = "ts", derive(TS))]
26843#[cfg_attr(feature = "ts", ts(export))]
26844pub struct SCALED_PRESSURE2_DATA {
26845    #[doc = "Timestamp (time since system boot)."]
26846    pub time_boot_ms: u32,
26847    #[doc = "Absolute pressure"]
26848    pub press_abs: f32,
26849    #[doc = "Differential pressure"]
26850    pub press_diff: f32,
26851    #[doc = "Absolute pressure temperature"]
26852    pub temperature: i16,
26853    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26854    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26855    pub temperature_press_diff: i16,
26856}
26857impl SCALED_PRESSURE2_DATA {
26858    pub const ENCODED_LEN: usize = 16usize;
26859    pub const DEFAULT: Self = Self {
26860        time_boot_ms: 0_u32,
26861        press_abs: 0.0_f32,
26862        press_diff: 0.0_f32,
26863        temperature: 0_i16,
26864        temperature_press_diff: 0_i16,
26865    };
26866    #[cfg(feature = "arbitrary")]
26867    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26868        use arbitrary::{Arbitrary, Unstructured};
26869        let mut buf = [0u8; 1024];
26870        rng.fill_bytes(&mut buf);
26871        let mut unstructured = Unstructured::new(&buf);
26872        Self::arbitrary(&mut unstructured).unwrap_or_default()
26873    }
26874}
26875impl Default for SCALED_PRESSURE2_DATA {
26876    fn default() -> Self {
26877        Self::DEFAULT.clone()
26878    }
26879}
26880impl MessageData for SCALED_PRESSURE2_DATA {
26881    type Message = MavMessage;
26882    const ID: u32 = 137u32;
26883    const NAME: &'static str = "SCALED_PRESSURE2";
26884    const EXTRA_CRC: u8 = 195u8;
26885    const ENCODED_LEN: usize = 16usize;
26886    fn deser(
26887        _version: MavlinkVersion,
26888        __input: &[u8],
26889    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26890        let avail_len = __input.len();
26891        let mut payload_buf = [0; Self::ENCODED_LEN];
26892        let mut buf = if avail_len < Self::ENCODED_LEN {
26893            payload_buf[0..avail_len].copy_from_slice(__input);
26894            Bytes::new(&payload_buf)
26895        } else {
26896            Bytes::new(__input)
26897        };
26898        let mut __struct = Self::default();
26899        __struct.time_boot_ms = buf.get_u32_le()?;
26900        __struct.press_abs = buf.get_f32_le()?;
26901        __struct.press_diff = buf.get_f32_le()?;
26902        __struct.temperature = buf.get_i16_le()?;
26903        __struct.temperature_press_diff = buf.get_i16_le()?;
26904        Ok(__struct)
26905    }
26906    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26907        let mut __tmp = BytesMut::new(bytes);
26908        #[allow(clippy::absurd_extreme_comparisons)]
26909        #[allow(unused_comparisons)]
26910        if __tmp.remaining() < Self::ENCODED_LEN {
26911            panic!(
26912                "buffer is too small (need {} bytes, but got {})",
26913                Self::ENCODED_LEN,
26914                __tmp.remaining(),
26915            )
26916        }
26917        __tmp.put_u32_le(self.time_boot_ms);
26918        __tmp.put_f32_le(self.press_abs);
26919        __tmp.put_f32_le(self.press_diff);
26920        __tmp.put_i16_le(self.temperature);
26921        if matches!(version, MavlinkVersion::V2) {
26922            __tmp.put_i16_le(self.temperature_press_diff);
26923            let len = __tmp.len();
26924            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26925        } else {
26926            __tmp.len()
26927        }
26928    }
26929}
26930#[doc = "Barometer readings for 3rd barometer."]
26931#[doc = ""]
26932#[doc = "ID: 143"]
26933#[derive(Debug, Clone, PartialEq)]
26934#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26935#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26936#[cfg_attr(feature = "ts", derive(TS))]
26937#[cfg_attr(feature = "ts", ts(export))]
26938pub struct SCALED_PRESSURE3_DATA {
26939    #[doc = "Timestamp (time since system boot)."]
26940    pub time_boot_ms: u32,
26941    #[doc = "Absolute pressure"]
26942    pub press_abs: f32,
26943    #[doc = "Differential pressure"]
26944    pub press_diff: f32,
26945    #[doc = "Absolute pressure temperature"]
26946    pub temperature: i16,
26947    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26948    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26949    pub temperature_press_diff: i16,
26950}
26951impl SCALED_PRESSURE3_DATA {
26952    pub const ENCODED_LEN: usize = 16usize;
26953    pub const DEFAULT: Self = Self {
26954        time_boot_ms: 0_u32,
26955        press_abs: 0.0_f32,
26956        press_diff: 0.0_f32,
26957        temperature: 0_i16,
26958        temperature_press_diff: 0_i16,
26959    };
26960    #[cfg(feature = "arbitrary")]
26961    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26962        use arbitrary::{Arbitrary, Unstructured};
26963        let mut buf = [0u8; 1024];
26964        rng.fill_bytes(&mut buf);
26965        let mut unstructured = Unstructured::new(&buf);
26966        Self::arbitrary(&mut unstructured).unwrap_or_default()
26967    }
26968}
26969impl Default for SCALED_PRESSURE3_DATA {
26970    fn default() -> Self {
26971        Self::DEFAULT.clone()
26972    }
26973}
26974impl MessageData for SCALED_PRESSURE3_DATA {
26975    type Message = MavMessage;
26976    const ID: u32 = 143u32;
26977    const NAME: &'static str = "SCALED_PRESSURE3";
26978    const EXTRA_CRC: u8 = 131u8;
26979    const ENCODED_LEN: usize = 16usize;
26980    fn deser(
26981        _version: MavlinkVersion,
26982        __input: &[u8],
26983    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26984        let avail_len = __input.len();
26985        let mut payload_buf = [0; Self::ENCODED_LEN];
26986        let mut buf = if avail_len < Self::ENCODED_LEN {
26987            payload_buf[0..avail_len].copy_from_slice(__input);
26988            Bytes::new(&payload_buf)
26989        } else {
26990            Bytes::new(__input)
26991        };
26992        let mut __struct = Self::default();
26993        __struct.time_boot_ms = buf.get_u32_le()?;
26994        __struct.press_abs = buf.get_f32_le()?;
26995        __struct.press_diff = buf.get_f32_le()?;
26996        __struct.temperature = buf.get_i16_le()?;
26997        __struct.temperature_press_diff = buf.get_i16_le()?;
26998        Ok(__struct)
26999    }
27000    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27001        let mut __tmp = BytesMut::new(bytes);
27002        #[allow(clippy::absurd_extreme_comparisons)]
27003        #[allow(unused_comparisons)]
27004        if __tmp.remaining() < Self::ENCODED_LEN {
27005            panic!(
27006                "buffer is too small (need {} bytes, but got {})",
27007                Self::ENCODED_LEN,
27008                __tmp.remaining(),
27009            )
27010        }
27011        __tmp.put_u32_le(self.time_boot_ms);
27012        __tmp.put_f32_le(self.press_abs);
27013        __tmp.put_f32_le(self.press_diff);
27014        __tmp.put_i16_le(self.temperature);
27015        if matches!(version, MavlinkVersion::V2) {
27016            __tmp.put_i16_le(self.temperature_press_diff);
27017            let len = __tmp.len();
27018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27019        } else {
27020            __tmp.len()
27021        }
27022    }
27023}
27024#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27025#[doc = ""]
27026#[doc = "ID: 126"]
27027#[derive(Debug, Clone, PartialEq)]
27028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27030#[cfg_attr(feature = "ts", derive(TS))]
27031#[cfg_attr(feature = "ts", ts(export))]
27032pub struct SERIAL_CONTROL_DATA {
27033    #[doc = "Baudrate of transfer. Zero means no change."]
27034    pub baudrate: u32,
27035    #[doc = "Timeout for reply data"]
27036    pub timeout: u16,
27037    #[doc = "Serial control device type."]
27038    pub device: SerialControlDev,
27039    #[doc = "Bitmap of serial control flags."]
27040    pub flags: SerialControlFlag,
27041    #[doc = "how many bytes in this transfer"]
27042    pub count: u8,
27043    #[doc = "serial data"]
27044    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27045    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27046    pub data: [u8; 70],
27047    #[doc = "System ID"]
27048    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27049    pub target_system: u8,
27050    #[doc = "Component ID"]
27051    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27052    pub target_component: u8,
27053}
27054impl SERIAL_CONTROL_DATA {
27055    pub const ENCODED_LEN: usize = 81usize;
27056    pub const DEFAULT: Self = Self {
27057        baudrate: 0_u32,
27058        timeout: 0_u16,
27059        device: SerialControlDev::DEFAULT,
27060        flags: SerialControlFlag::DEFAULT,
27061        count: 0_u8,
27062        data: [0_u8; 70usize],
27063        target_system: 0_u8,
27064        target_component: 0_u8,
27065    };
27066    #[cfg(feature = "arbitrary")]
27067    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27068        use arbitrary::{Arbitrary, Unstructured};
27069        let mut buf = [0u8; 1024];
27070        rng.fill_bytes(&mut buf);
27071        let mut unstructured = Unstructured::new(&buf);
27072        Self::arbitrary(&mut unstructured).unwrap_or_default()
27073    }
27074}
27075impl Default for SERIAL_CONTROL_DATA {
27076    fn default() -> Self {
27077        Self::DEFAULT.clone()
27078    }
27079}
27080impl MessageData for SERIAL_CONTROL_DATA {
27081    type Message = MavMessage;
27082    const ID: u32 = 126u32;
27083    const NAME: &'static str = "SERIAL_CONTROL";
27084    const EXTRA_CRC: u8 = 220u8;
27085    const ENCODED_LEN: usize = 81usize;
27086    fn deser(
27087        _version: MavlinkVersion,
27088        __input: &[u8],
27089    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27090        let avail_len = __input.len();
27091        let mut payload_buf = [0; Self::ENCODED_LEN];
27092        let mut buf = if avail_len < Self::ENCODED_LEN {
27093            payload_buf[0..avail_len].copy_from_slice(__input);
27094            Bytes::new(&payload_buf)
27095        } else {
27096            Bytes::new(__input)
27097        };
27098        let mut __struct = Self::default();
27099        __struct.baudrate = buf.get_u32_le()?;
27100        __struct.timeout = buf.get_u16_le()?;
27101        let tmp = buf.get_u8()?;
27102        __struct.device =
27103            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27104                enum_type: "SerialControlDev",
27105                value: tmp as u64,
27106            })?;
27107        let tmp = buf.get_u8()?;
27108        __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
27109            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27110                flag_type: "SerialControlFlag",
27111                value: tmp as u64,
27112            })?;
27113        __struct.count = buf.get_u8()?;
27114        for v in &mut __struct.data {
27115            let val = buf.get_u8()?;
27116            *v = val;
27117        }
27118        __struct.target_system = buf.get_u8()?;
27119        __struct.target_component = buf.get_u8()?;
27120        Ok(__struct)
27121    }
27122    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27123        let mut __tmp = BytesMut::new(bytes);
27124        #[allow(clippy::absurd_extreme_comparisons)]
27125        #[allow(unused_comparisons)]
27126        if __tmp.remaining() < Self::ENCODED_LEN {
27127            panic!(
27128                "buffer is too small (need {} bytes, but got {})",
27129                Self::ENCODED_LEN,
27130                __tmp.remaining(),
27131            )
27132        }
27133        __tmp.put_u32_le(self.baudrate);
27134        __tmp.put_u16_le(self.timeout);
27135        __tmp.put_u8(self.device as u8);
27136        __tmp.put_u8(self.flags.bits() as u8);
27137        __tmp.put_u8(self.count);
27138        for val in &self.data {
27139            __tmp.put_u8(*val);
27140        }
27141        if matches!(version, MavlinkVersion::V2) {
27142            __tmp.put_u8(self.target_system);
27143            __tmp.put_u8(self.target_component);
27144            let len = __tmp.len();
27145            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27146        } else {
27147            __tmp.len()
27148        }
27149    }
27150}
27151#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27152#[doc = ""]
27153#[doc = "ID: 36"]
27154#[derive(Debug, Clone, PartialEq)]
27155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27157#[cfg_attr(feature = "ts", derive(TS))]
27158#[cfg_attr(feature = "ts", ts(export))]
27159pub struct SERVO_OUTPUT_RAW_DATA {
27160    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27161    pub time_usec: u32,
27162    #[doc = "Servo output 1 value"]
27163    pub servo1_raw: u16,
27164    #[doc = "Servo output 2 value"]
27165    pub servo2_raw: u16,
27166    #[doc = "Servo output 3 value"]
27167    pub servo3_raw: u16,
27168    #[doc = "Servo output 4 value"]
27169    pub servo4_raw: u16,
27170    #[doc = "Servo output 5 value"]
27171    pub servo5_raw: u16,
27172    #[doc = "Servo output 6 value"]
27173    pub servo6_raw: u16,
27174    #[doc = "Servo output 7 value"]
27175    pub servo7_raw: u16,
27176    #[doc = "Servo output 8 value"]
27177    pub servo8_raw: u16,
27178    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27179    pub port: u8,
27180    #[doc = "Servo output 9 value"]
27181    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27182    pub servo9_raw: u16,
27183    #[doc = "Servo output 10 value"]
27184    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27185    pub servo10_raw: u16,
27186    #[doc = "Servo output 11 value"]
27187    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27188    pub servo11_raw: u16,
27189    #[doc = "Servo output 12 value"]
27190    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27191    pub servo12_raw: u16,
27192    #[doc = "Servo output 13 value"]
27193    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27194    pub servo13_raw: u16,
27195    #[doc = "Servo output 14 value"]
27196    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27197    pub servo14_raw: u16,
27198    #[doc = "Servo output 15 value"]
27199    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27200    pub servo15_raw: u16,
27201    #[doc = "Servo output 16 value"]
27202    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27203    pub servo16_raw: u16,
27204}
27205impl SERVO_OUTPUT_RAW_DATA {
27206    pub const ENCODED_LEN: usize = 37usize;
27207    pub const DEFAULT: Self = Self {
27208        time_usec: 0_u32,
27209        servo1_raw: 0_u16,
27210        servo2_raw: 0_u16,
27211        servo3_raw: 0_u16,
27212        servo4_raw: 0_u16,
27213        servo5_raw: 0_u16,
27214        servo6_raw: 0_u16,
27215        servo7_raw: 0_u16,
27216        servo8_raw: 0_u16,
27217        port: 0_u8,
27218        servo9_raw: 0_u16,
27219        servo10_raw: 0_u16,
27220        servo11_raw: 0_u16,
27221        servo12_raw: 0_u16,
27222        servo13_raw: 0_u16,
27223        servo14_raw: 0_u16,
27224        servo15_raw: 0_u16,
27225        servo16_raw: 0_u16,
27226    };
27227    #[cfg(feature = "arbitrary")]
27228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27229        use arbitrary::{Arbitrary, Unstructured};
27230        let mut buf = [0u8; 1024];
27231        rng.fill_bytes(&mut buf);
27232        let mut unstructured = Unstructured::new(&buf);
27233        Self::arbitrary(&mut unstructured).unwrap_or_default()
27234    }
27235}
27236impl Default for SERVO_OUTPUT_RAW_DATA {
27237    fn default() -> Self {
27238        Self::DEFAULT.clone()
27239    }
27240}
27241impl MessageData for SERVO_OUTPUT_RAW_DATA {
27242    type Message = MavMessage;
27243    const ID: u32 = 36u32;
27244    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27245    const EXTRA_CRC: u8 = 222u8;
27246    const ENCODED_LEN: usize = 37usize;
27247    fn deser(
27248        _version: MavlinkVersion,
27249        __input: &[u8],
27250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27251        let avail_len = __input.len();
27252        let mut payload_buf = [0; Self::ENCODED_LEN];
27253        let mut buf = if avail_len < Self::ENCODED_LEN {
27254            payload_buf[0..avail_len].copy_from_slice(__input);
27255            Bytes::new(&payload_buf)
27256        } else {
27257            Bytes::new(__input)
27258        };
27259        let mut __struct = Self::default();
27260        __struct.time_usec = buf.get_u32_le()?;
27261        __struct.servo1_raw = buf.get_u16_le()?;
27262        __struct.servo2_raw = buf.get_u16_le()?;
27263        __struct.servo3_raw = buf.get_u16_le()?;
27264        __struct.servo4_raw = buf.get_u16_le()?;
27265        __struct.servo5_raw = buf.get_u16_le()?;
27266        __struct.servo6_raw = buf.get_u16_le()?;
27267        __struct.servo7_raw = buf.get_u16_le()?;
27268        __struct.servo8_raw = buf.get_u16_le()?;
27269        __struct.port = buf.get_u8()?;
27270        __struct.servo9_raw = buf.get_u16_le()?;
27271        __struct.servo10_raw = buf.get_u16_le()?;
27272        __struct.servo11_raw = buf.get_u16_le()?;
27273        __struct.servo12_raw = buf.get_u16_le()?;
27274        __struct.servo13_raw = buf.get_u16_le()?;
27275        __struct.servo14_raw = buf.get_u16_le()?;
27276        __struct.servo15_raw = buf.get_u16_le()?;
27277        __struct.servo16_raw = buf.get_u16_le()?;
27278        Ok(__struct)
27279    }
27280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27281        let mut __tmp = BytesMut::new(bytes);
27282        #[allow(clippy::absurd_extreme_comparisons)]
27283        #[allow(unused_comparisons)]
27284        if __tmp.remaining() < Self::ENCODED_LEN {
27285            panic!(
27286                "buffer is too small (need {} bytes, but got {})",
27287                Self::ENCODED_LEN,
27288                __tmp.remaining(),
27289            )
27290        }
27291        __tmp.put_u32_le(self.time_usec);
27292        __tmp.put_u16_le(self.servo1_raw);
27293        __tmp.put_u16_le(self.servo2_raw);
27294        __tmp.put_u16_le(self.servo3_raw);
27295        __tmp.put_u16_le(self.servo4_raw);
27296        __tmp.put_u16_le(self.servo5_raw);
27297        __tmp.put_u16_le(self.servo6_raw);
27298        __tmp.put_u16_le(self.servo7_raw);
27299        __tmp.put_u16_le(self.servo8_raw);
27300        __tmp.put_u8(self.port);
27301        if matches!(version, MavlinkVersion::V2) {
27302            __tmp.put_u16_le(self.servo9_raw);
27303            __tmp.put_u16_le(self.servo10_raw);
27304            __tmp.put_u16_le(self.servo11_raw);
27305            __tmp.put_u16_le(self.servo12_raw);
27306            __tmp.put_u16_le(self.servo13_raw);
27307            __tmp.put_u16_le(self.servo14_raw);
27308            __tmp.put_u16_le(self.servo15_raw);
27309            __tmp.put_u16_le(self.servo16_raw);
27310            let len = __tmp.len();
27311            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27312        } else {
27313            __tmp.len()
27314        }
27315    }
27316}
27317#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27318#[doc = ""]
27319#[doc = "ID: 256"]
27320#[derive(Debug, Clone, PartialEq)]
27321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27322#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27323#[cfg_attr(feature = "ts", derive(TS))]
27324#[cfg_attr(feature = "ts", ts(export))]
27325pub struct SETUP_SIGNING_DATA {
27326    #[doc = "initial timestamp"]
27327    pub initial_timestamp: u64,
27328    #[doc = "system id of the target"]
27329    pub target_system: u8,
27330    #[doc = "component ID of the target"]
27331    pub target_component: u8,
27332    #[doc = "signing key"]
27333    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27334    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27335    pub secret_key: [u8; 32],
27336}
27337impl SETUP_SIGNING_DATA {
27338    pub const ENCODED_LEN: usize = 42usize;
27339    pub const DEFAULT: Self = Self {
27340        initial_timestamp: 0_u64,
27341        target_system: 0_u8,
27342        target_component: 0_u8,
27343        secret_key: [0_u8; 32usize],
27344    };
27345    #[cfg(feature = "arbitrary")]
27346    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27347        use arbitrary::{Arbitrary, Unstructured};
27348        let mut buf = [0u8; 1024];
27349        rng.fill_bytes(&mut buf);
27350        let mut unstructured = Unstructured::new(&buf);
27351        Self::arbitrary(&mut unstructured).unwrap_or_default()
27352    }
27353}
27354impl Default for SETUP_SIGNING_DATA {
27355    fn default() -> Self {
27356        Self::DEFAULT.clone()
27357    }
27358}
27359impl MessageData for SETUP_SIGNING_DATA {
27360    type Message = MavMessage;
27361    const ID: u32 = 256u32;
27362    const NAME: &'static str = "SETUP_SIGNING";
27363    const EXTRA_CRC: u8 = 71u8;
27364    const ENCODED_LEN: usize = 42usize;
27365    fn deser(
27366        _version: MavlinkVersion,
27367        __input: &[u8],
27368    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27369        let avail_len = __input.len();
27370        let mut payload_buf = [0; Self::ENCODED_LEN];
27371        let mut buf = if avail_len < Self::ENCODED_LEN {
27372            payload_buf[0..avail_len].copy_from_slice(__input);
27373            Bytes::new(&payload_buf)
27374        } else {
27375            Bytes::new(__input)
27376        };
27377        let mut __struct = Self::default();
27378        __struct.initial_timestamp = buf.get_u64_le()?;
27379        __struct.target_system = buf.get_u8()?;
27380        __struct.target_component = buf.get_u8()?;
27381        for v in &mut __struct.secret_key {
27382            let val = buf.get_u8()?;
27383            *v = val;
27384        }
27385        Ok(__struct)
27386    }
27387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27388        let mut __tmp = BytesMut::new(bytes);
27389        #[allow(clippy::absurd_extreme_comparisons)]
27390        #[allow(unused_comparisons)]
27391        if __tmp.remaining() < Self::ENCODED_LEN {
27392            panic!(
27393                "buffer is too small (need {} bytes, but got {})",
27394                Self::ENCODED_LEN,
27395                __tmp.remaining(),
27396            )
27397        }
27398        __tmp.put_u64_le(self.initial_timestamp);
27399        __tmp.put_u8(self.target_system);
27400        __tmp.put_u8(self.target_component);
27401        for val in &self.secret_key {
27402            __tmp.put_u8(*val);
27403        }
27404        if matches!(version, MavlinkVersion::V2) {
27405            let len = __tmp.len();
27406            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27407        } else {
27408            __tmp.len()
27409        }
27410    }
27411}
27412#[doc = "Set the vehicle attitude and body angular rates."]
27413#[doc = ""]
27414#[doc = "ID: 139"]
27415#[derive(Debug, Clone, PartialEq)]
27416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27418#[cfg_attr(feature = "ts", derive(TS))]
27419#[cfg_attr(feature = "ts", ts(export))]
27420pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27421    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27422    pub time_usec: u64,
27423    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27424    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27425    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27426    pub controls: [f32; 8],
27427    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27428    pub group_mlx: u8,
27429    #[doc = "System ID"]
27430    pub target_system: u8,
27431    #[doc = "Component ID"]
27432    pub target_component: u8,
27433}
27434impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27435    pub const ENCODED_LEN: usize = 43usize;
27436    pub const DEFAULT: Self = Self {
27437        time_usec: 0_u64,
27438        controls: [0.0_f32; 8usize],
27439        group_mlx: 0_u8,
27440        target_system: 0_u8,
27441        target_component: 0_u8,
27442    };
27443    #[cfg(feature = "arbitrary")]
27444    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27445        use arbitrary::{Arbitrary, Unstructured};
27446        let mut buf = [0u8; 1024];
27447        rng.fill_bytes(&mut buf);
27448        let mut unstructured = Unstructured::new(&buf);
27449        Self::arbitrary(&mut unstructured).unwrap_or_default()
27450    }
27451}
27452impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27453    fn default() -> Self {
27454        Self::DEFAULT.clone()
27455    }
27456}
27457impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27458    type Message = MavMessage;
27459    const ID: u32 = 139u32;
27460    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27461    const EXTRA_CRC: u8 = 168u8;
27462    const ENCODED_LEN: usize = 43usize;
27463    fn deser(
27464        _version: MavlinkVersion,
27465        __input: &[u8],
27466    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27467        let avail_len = __input.len();
27468        let mut payload_buf = [0; Self::ENCODED_LEN];
27469        let mut buf = if avail_len < Self::ENCODED_LEN {
27470            payload_buf[0..avail_len].copy_from_slice(__input);
27471            Bytes::new(&payload_buf)
27472        } else {
27473            Bytes::new(__input)
27474        };
27475        let mut __struct = Self::default();
27476        __struct.time_usec = buf.get_u64_le()?;
27477        for v in &mut __struct.controls {
27478            let val = buf.get_f32_le()?;
27479            *v = val;
27480        }
27481        __struct.group_mlx = buf.get_u8()?;
27482        __struct.target_system = buf.get_u8()?;
27483        __struct.target_component = buf.get_u8()?;
27484        Ok(__struct)
27485    }
27486    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27487        let mut __tmp = BytesMut::new(bytes);
27488        #[allow(clippy::absurd_extreme_comparisons)]
27489        #[allow(unused_comparisons)]
27490        if __tmp.remaining() < Self::ENCODED_LEN {
27491            panic!(
27492                "buffer is too small (need {} bytes, but got {})",
27493                Self::ENCODED_LEN,
27494                __tmp.remaining(),
27495            )
27496        }
27497        __tmp.put_u64_le(self.time_usec);
27498        for val in &self.controls {
27499            __tmp.put_f32_le(*val);
27500        }
27501        __tmp.put_u8(self.group_mlx);
27502        __tmp.put_u8(self.target_system);
27503        __tmp.put_u8(self.target_component);
27504        if matches!(version, MavlinkVersion::V2) {
27505            let len = __tmp.len();
27506            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27507        } else {
27508            __tmp.len()
27509        }
27510    }
27511}
27512#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
27513#[doc = ""]
27514#[doc = "ID: 82"]
27515#[derive(Debug, Clone, PartialEq)]
27516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27518#[cfg_attr(feature = "ts", derive(TS))]
27519#[cfg_attr(feature = "ts", ts(export))]
27520pub struct SET_ATTITUDE_TARGET_DATA {
27521    #[doc = "Timestamp (time since system boot)."]
27522    pub time_boot_ms: u32,
27523    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
27524    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27525    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27526    pub q: [f32; 4],
27527    #[doc = "Body roll rate"]
27528    pub body_roll_rate: f32,
27529    #[doc = "Body pitch rate"]
27530    pub body_pitch_rate: f32,
27531    #[doc = "Body yaw rate"]
27532    pub body_yaw_rate: f32,
27533    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
27534    pub thrust: f32,
27535    #[doc = "System ID"]
27536    pub target_system: u8,
27537    #[doc = "Component ID"]
27538    pub target_component: u8,
27539    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27540    pub type_mask: AttitudeTargetTypemask,
27541    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
27542    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27543    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27544    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27545    pub thrust_body: [f32; 3],
27546}
27547impl SET_ATTITUDE_TARGET_DATA {
27548    pub const ENCODED_LEN: usize = 51usize;
27549    pub const DEFAULT: Self = Self {
27550        time_boot_ms: 0_u32,
27551        q: [0.0_f32; 4usize],
27552        body_roll_rate: 0.0_f32,
27553        body_pitch_rate: 0.0_f32,
27554        body_yaw_rate: 0.0_f32,
27555        thrust: 0.0_f32,
27556        target_system: 0_u8,
27557        target_component: 0_u8,
27558        type_mask: AttitudeTargetTypemask::DEFAULT,
27559        thrust_body: [0.0_f32; 3usize],
27560    };
27561    #[cfg(feature = "arbitrary")]
27562    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27563        use arbitrary::{Arbitrary, Unstructured};
27564        let mut buf = [0u8; 1024];
27565        rng.fill_bytes(&mut buf);
27566        let mut unstructured = Unstructured::new(&buf);
27567        Self::arbitrary(&mut unstructured).unwrap_or_default()
27568    }
27569}
27570impl Default for SET_ATTITUDE_TARGET_DATA {
27571    fn default() -> Self {
27572        Self::DEFAULT.clone()
27573    }
27574}
27575impl MessageData for SET_ATTITUDE_TARGET_DATA {
27576    type Message = MavMessage;
27577    const ID: u32 = 82u32;
27578    const NAME: &'static str = "SET_ATTITUDE_TARGET";
27579    const EXTRA_CRC: u8 = 49u8;
27580    const ENCODED_LEN: usize = 51usize;
27581    fn deser(
27582        _version: MavlinkVersion,
27583        __input: &[u8],
27584    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27585        let avail_len = __input.len();
27586        let mut payload_buf = [0; Self::ENCODED_LEN];
27587        let mut buf = if avail_len < Self::ENCODED_LEN {
27588            payload_buf[0..avail_len].copy_from_slice(__input);
27589            Bytes::new(&payload_buf)
27590        } else {
27591            Bytes::new(__input)
27592        };
27593        let mut __struct = Self::default();
27594        __struct.time_boot_ms = buf.get_u32_le()?;
27595        for v in &mut __struct.q {
27596            let val = buf.get_f32_le()?;
27597            *v = val;
27598        }
27599        __struct.body_roll_rate = buf.get_f32_le()?;
27600        __struct.body_pitch_rate = buf.get_f32_le()?;
27601        __struct.body_yaw_rate = buf.get_f32_le()?;
27602        __struct.thrust = buf.get_f32_le()?;
27603        __struct.target_system = buf.get_u8()?;
27604        __struct.target_component = buf.get_u8()?;
27605        let tmp = buf.get_u8()?;
27606        __struct.type_mask =
27607            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
27608                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27609                    flag_type: "AttitudeTargetTypemask",
27610                    value: tmp as u64,
27611                })?;
27612        for v in &mut __struct.thrust_body {
27613            let val = buf.get_f32_le()?;
27614            *v = val;
27615        }
27616        Ok(__struct)
27617    }
27618    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27619        let mut __tmp = BytesMut::new(bytes);
27620        #[allow(clippy::absurd_extreme_comparisons)]
27621        #[allow(unused_comparisons)]
27622        if __tmp.remaining() < Self::ENCODED_LEN {
27623            panic!(
27624                "buffer is too small (need {} bytes, but got {})",
27625                Self::ENCODED_LEN,
27626                __tmp.remaining(),
27627            )
27628        }
27629        __tmp.put_u32_le(self.time_boot_ms);
27630        for val in &self.q {
27631            __tmp.put_f32_le(*val);
27632        }
27633        __tmp.put_f32_le(self.body_roll_rate);
27634        __tmp.put_f32_le(self.body_pitch_rate);
27635        __tmp.put_f32_le(self.body_yaw_rate);
27636        __tmp.put_f32_le(self.thrust);
27637        __tmp.put_u8(self.target_system);
27638        __tmp.put_u8(self.target_component);
27639        __tmp.put_u8(self.type_mask.bits() as u8);
27640        if matches!(version, MavlinkVersion::V2) {
27641            for val in &self.thrust_body {
27642                __tmp.put_f32_le(*val);
27643            }
27644            let len = __tmp.len();
27645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27646        } else {
27647            __tmp.len()
27648        }
27649    }
27650}
27651#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
27652#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
27653#[doc = ""]
27654#[doc = "ID: 48"]
27655#[derive(Debug, Clone, PartialEq)]
27656#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27658#[cfg_attr(feature = "ts", derive(TS))]
27659#[cfg_attr(feature = "ts", ts(export))]
27660pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
27661    #[doc = "Latitude (WGS84)"]
27662    pub latitude: i32,
27663    #[doc = "Longitude (WGS84)"]
27664    pub longitude: i32,
27665    #[doc = "Altitude (MSL). Positive for up."]
27666    pub altitude: i32,
27667    #[doc = "System ID"]
27668    pub target_system: u8,
27669    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27670    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27671    pub time_usec: u64,
27672}
27673impl SET_GPS_GLOBAL_ORIGIN_DATA {
27674    pub const ENCODED_LEN: usize = 21usize;
27675    pub const DEFAULT: Self = Self {
27676        latitude: 0_i32,
27677        longitude: 0_i32,
27678        altitude: 0_i32,
27679        target_system: 0_u8,
27680        time_usec: 0_u64,
27681    };
27682    #[cfg(feature = "arbitrary")]
27683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27684        use arbitrary::{Arbitrary, Unstructured};
27685        let mut buf = [0u8; 1024];
27686        rng.fill_bytes(&mut buf);
27687        let mut unstructured = Unstructured::new(&buf);
27688        Self::arbitrary(&mut unstructured).unwrap_or_default()
27689    }
27690}
27691impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
27692    fn default() -> Self {
27693        Self::DEFAULT.clone()
27694    }
27695}
27696impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
27697    type Message = MavMessage;
27698    const ID: u32 = 48u32;
27699    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
27700    const EXTRA_CRC: u8 = 41u8;
27701    const ENCODED_LEN: usize = 21usize;
27702    fn deser(
27703        _version: MavlinkVersion,
27704        __input: &[u8],
27705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27706        let avail_len = __input.len();
27707        let mut payload_buf = [0; Self::ENCODED_LEN];
27708        let mut buf = if avail_len < Self::ENCODED_LEN {
27709            payload_buf[0..avail_len].copy_from_slice(__input);
27710            Bytes::new(&payload_buf)
27711        } else {
27712            Bytes::new(__input)
27713        };
27714        let mut __struct = Self::default();
27715        __struct.latitude = buf.get_i32_le()?;
27716        __struct.longitude = buf.get_i32_le()?;
27717        __struct.altitude = buf.get_i32_le()?;
27718        __struct.target_system = buf.get_u8()?;
27719        __struct.time_usec = buf.get_u64_le()?;
27720        Ok(__struct)
27721    }
27722    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27723        let mut __tmp = BytesMut::new(bytes);
27724        #[allow(clippy::absurd_extreme_comparisons)]
27725        #[allow(unused_comparisons)]
27726        if __tmp.remaining() < Self::ENCODED_LEN {
27727            panic!(
27728                "buffer is too small (need {} bytes, but got {})",
27729                Self::ENCODED_LEN,
27730                __tmp.remaining(),
27731            )
27732        }
27733        __tmp.put_i32_le(self.latitude);
27734        __tmp.put_i32_le(self.longitude);
27735        __tmp.put_i32_le(self.altitude);
27736        __tmp.put_u8(self.target_system);
27737        if matches!(version, MavlinkVersion::V2) {
27738            __tmp.put_u64_le(self.time_usec);
27739            let len = __tmp.len();
27740            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27741        } else {
27742            __tmp.len()
27743        }
27744    }
27745}
27746#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
27747#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
27748#[doc = ""]
27749#[doc = "ID: 243"]
27750#[derive(Debug, Clone, PartialEq)]
27751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27753#[cfg_attr(feature = "ts", derive(TS))]
27754#[cfg_attr(feature = "ts", ts(export))]
27755pub struct SET_HOME_POSITION_DATA {
27756    #[doc = "Latitude (WGS84)"]
27757    pub latitude: i32,
27758    #[doc = "Longitude (WGS84)"]
27759    pub longitude: i32,
27760    #[doc = "Altitude (MSL). Positive for up."]
27761    pub altitude: i32,
27762    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
27763    pub x: f32,
27764    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
27765    pub y: f32,
27766    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
27767    pub z: f32,
27768    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
27769    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27770    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27771    pub q: [f32; 4],
27772    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27773    pub approach_x: f32,
27774    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27775    pub approach_y: f32,
27776    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27777    pub approach_z: f32,
27778    #[doc = "System ID."]
27779    pub target_system: u8,
27780    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27781    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27782    pub time_usec: u64,
27783}
27784impl SET_HOME_POSITION_DATA {
27785    pub const ENCODED_LEN: usize = 61usize;
27786    pub const DEFAULT: Self = Self {
27787        latitude: 0_i32,
27788        longitude: 0_i32,
27789        altitude: 0_i32,
27790        x: 0.0_f32,
27791        y: 0.0_f32,
27792        z: 0.0_f32,
27793        q: [0.0_f32; 4usize],
27794        approach_x: 0.0_f32,
27795        approach_y: 0.0_f32,
27796        approach_z: 0.0_f32,
27797        target_system: 0_u8,
27798        time_usec: 0_u64,
27799    };
27800    #[cfg(feature = "arbitrary")]
27801    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27802        use arbitrary::{Arbitrary, Unstructured};
27803        let mut buf = [0u8; 1024];
27804        rng.fill_bytes(&mut buf);
27805        let mut unstructured = Unstructured::new(&buf);
27806        Self::arbitrary(&mut unstructured).unwrap_or_default()
27807    }
27808}
27809impl Default for SET_HOME_POSITION_DATA {
27810    fn default() -> Self {
27811        Self::DEFAULT.clone()
27812    }
27813}
27814impl MessageData for SET_HOME_POSITION_DATA {
27815    type Message = MavMessage;
27816    const ID: u32 = 243u32;
27817    const NAME: &'static str = "SET_HOME_POSITION";
27818    const EXTRA_CRC: u8 = 85u8;
27819    const ENCODED_LEN: usize = 61usize;
27820    fn deser(
27821        _version: MavlinkVersion,
27822        __input: &[u8],
27823    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27824        let avail_len = __input.len();
27825        let mut payload_buf = [0; Self::ENCODED_LEN];
27826        let mut buf = if avail_len < Self::ENCODED_LEN {
27827            payload_buf[0..avail_len].copy_from_slice(__input);
27828            Bytes::new(&payload_buf)
27829        } else {
27830            Bytes::new(__input)
27831        };
27832        let mut __struct = Self::default();
27833        __struct.latitude = buf.get_i32_le()?;
27834        __struct.longitude = buf.get_i32_le()?;
27835        __struct.altitude = buf.get_i32_le()?;
27836        __struct.x = buf.get_f32_le()?;
27837        __struct.y = buf.get_f32_le()?;
27838        __struct.z = buf.get_f32_le()?;
27839        for v in &mut __struct.q {
27840            let val = buf.get_f32_le()?;
27841            *v = val;
27842        }
27843        __struct.approach_x = buf.get_f32_le()?;
27844        __struct.approach_y = buf.get_f32_le()?;
27845        __struct.approach_z = buf.get_f32_le()?;
27846        __struct.target_system = buf.get_u8()?;
27847        __struct.time_usec = buf.get_u64_le()?;
27848        Ok(__struct)
27849    }
27850    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27851        let mut __tmp = BytesMut::new(bytes);
27852        #[allow(clippy::absurd_extreme_comparisons)]
27853        #[allow(unused_comparisons)]
27854        if __tmp.remaining() < Self::ENCODED_LEN {
27855            panic!(
27856                "buffer is too small (need {} bytes, but got {})",
27857                Self::ENCODED_LEN,
27858                __tmp.remaining(),
27859            )
27860        }
27861        __tmp.put_i32_le(self.latitude);
27862        __tmp.put_i32_le(self.longitude);
27863        __tmp.put_i32_le(self.altitude);
27864        __tmp.put_f32_le(self.x);
27865        __tmp.put_f32_le(self.y);
27866        __tmp.put_f32_le(self.z);
27867        for val in &self.q {
27868            __tmp.put_f32_le(*val);
27869        }
27870        __tmp.put_f32_le(self.approach_x);
27871        __tmp.put_f32_le(self.approach_y);
27872        __tmp.put_f32_le(self.approach_z);
27873        __tmp.put_u8(self.target_system);
27874        if matches!(version, MavlinkVersion::V2) {
27875            __tmp.put_u64_le(self.time_usec);
27876            let len = __tmp.len();
27877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27878        } else {
27879            __tmp.len()
27880        }
27881    }
27882}
27883#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
27884#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
27885#[doc = ""]
27886#[doc = "ID: 11"]
27887#[derive(Debug, Clone, PartialEq)]
27888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27889#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27890#[cfg_attr(feature = "ts", derive(TS))]
27891#[cfg_attr(feature = "ts", ts(export))]
27892pub struct SET_MODE_DATA {
27893    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
27894    pub custom_mode: u32,
27895    #[doc = "The system setting the mode"]
27896    pub target_system: u8,
27897    #[doc = "The new base mode."]
27898    pub base_mode: MavMode,
27899}
27900impl SET_MODE_DATA {
27901    pub const ENCODED_LEN: usize = 6usize;
27902    pub const DEFAULT: Self = Self {
27903        custom_mode: 0_u32,
27904        target_system: 0_u8,
27905        base_mode: MavMode::DEFAULT,
27906    };
27907    #[cfg(feature = "arbitrary")]
27908    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27909        use arbitrary::{Arbitrary, Unstructured};
27910        let mut buf = [0u8; 1024];
27911        rng.fill_bytes(&mut buf);
27912        let mut unstructured = Unstructured::new(&buf);
27913        Self::arbitrary(&mut unstructured).unwrap_or_default()
27914    }
27915}
27916impl Default for SET_MODE_DATA {
27917    fn default() -> Self {
27918        Self::DEFAULT.clone()
27919    }
27920}
27921impl MessageData for SET_MODE_DATA {
27922    type Message = MavMessage;
27923    const ID: u32 = 11u32;
27924    const NAME: &'static str = "SET_MODE";
27925    const EXTRA_CRC: u8 = 89u8;
27926    const ENCODED_LEN: usize = 6usize;
27927    fn deser(
27928        _version: MavlinkVersion,
27929        __input: &[u8],
27930    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27931        let avail_len = __input.len();
27932        let mut payload_buf = [0; Self::ENCODED_LEN];
27933        let mut buf = if avail_len < Self::ENCODED_LEN {
27934            payload_buf[0..avail_len].copy_from_slice(__input);
27935            Bytes::new(&payload_buf)
27936        } else {
27937            Bytes::new(__input)
27938        };
27939        let mut __struct = Self::default();
27940        __struct.custom_mode = buf.get_u32_le()?;
27941        __struct.target_system = buf.get_u8()?;
27942        let tmp = buf.get_u8()?;
27943        __struct.base_mode =
27944            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27945                enum_type: "MavMode",
27946                value: tmp as u64,
27947            })?;
27948        Ok(__struct)
27949    }
27950    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27951        let mut __tmp = BytesMut::new(bytes);
27952        #[allow(clippy::absurd_extreme_comparisons)]
27953        #[allow(unused_comparisons)]
27954        if __tmp.remaining() < Self::ENCODED_LEN {
27955            panic!(
27956                "buffer is too small (need {} bytes, but got {})",
27957                Self::ENCODED_LEN,
27958                __tmp.remaining(),
27959            )
27960        }
27961        __tmp.put_u32_le(self.custom_mode);
27962        __tmp.put_u8(self.target_system);
27963        __tmp.put_u8(self.base_mode as u8);
27964        if matches!(version, MavlinkVersion::V2) {
27965            let len = __tmp.len();
27966            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27967        } else {
27968            __tmp.len()
27969        }
27970    }
27971}
27972#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
27973#[doc = ""]
27974#[doc = "ID: 86"]
27975#[derive(Debug, Clone, PartialEq)]
27976#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27978#[cfg_attr(feature = "ts", derive(TS))]
27979#[cfg_attr(feature = "ts", ts(export))]
27980pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
27981    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
27982    pub time_boot_ms: u32,
27983    #[doc = "Latitude in WGS84 frame"]
27984    pub lat_int: i32,
27985    #[doc = "Longitude in WGS84 frame"]
27986    pub lon_int: i32,
27987    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
27988    pub alt: f32,
27989    #[doc = "X velocity in NED frame"]
27990    pub vx: f32,
27991    #[doc = "Y velocity in NED frame"]
27992    pub vy: f32,
27993    #[doc = "Z velocity in NED frame"]
27994    pub vz: f32,
27995    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27996    pub afx: f32,
27997    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27998    pub afy: f32,
27999    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28000    pub afz: f32,
28001    #[doc = "yaw setpoint"]
28002    pub yaw: f32,
28003    #[doc = "yaw rate setpoint"]
28004    pub yaw_rate: f32,
28005    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28006    pub type_mask: PositionTargetTypemask,
28007    #[doc = "System ID"]
28008    pub target_system: u8,
28009    #[doc = "Component ID"]
28010    pub target_component: u8,
28011    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28012    pub coordinate_frame: MavFrame,
28013}
28014impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28015    pub const ENCODED_LEN: usize = 53usize;
28016    pub const DEFAULT: Self = Self {
28017        time_boot_ms: 0_u32,
28018        lat_int: 0_i32,
28019        lon_int: 0_i32,
28020        alt: 0.0_f32,
28021        vx: 0.0_f32,
28022        vy: 0.0_f32,
28023        vz: 0.0_f32,
28024        afx: 0.0_f32,
28025        afy: 0.0_f32,
28026        afz: 0.0_f32,
28027        yaw: 0.0_f32,
28028        yaw_rate: 0.0_f32,
28029        type_mask: PositionTargetTypemask::DEFAULT,
28030        target_system: 0_u8,
28031        target_component: 0_u8,
28032        coordinate_frame: MavFrame::DEFAULT,
28033    };
28034    #[cfg(feature = "arbitrary")]
28035    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28036        use arbitrary::{Arbitrary, Unstructured};
28037        let mut buf = [0u8; 1024];
28038        rng.fill_bytes(&mut buf);
28039        let mut unstructured = Unstructured::new(&buf);
28040        Self::arbitrary(&mut unstructured).unwrap_or_default()
28041    }
28042}
28043impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28044    fn default() -> Self {
28045        Self::DEFAULT.clone()
28046    }
28047}
28048impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28049    type Message = MavMessage;
28050    const ID: u32 = 86u32;
28051    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28052    const EXTRA_CRC: u8 = 5u8;
28053    const ENCODED_LEN: usize = 53usize;
28054    fn deser(
28055        _version: MavlinkVersion,
28056        __input: &[u8],
28057    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28058        let avail_len = __input.len();
28059        let mut payload_buf = [0; Self::ENCODED_LEN];
28060        let mut buf = if avail_len < Self::ENCODED_LEN {
28061            payload_buf[0..avail_len].copy_from_slice(__input);
28062            Bytes::new(&payload_buf)
28063        } else {
28064            Bytes::new(__input)
28065        };
28066        let mut __struct = Self::default();
28067        __struct.time_boot_ms = buf.get_u32_le()?;
28068        __struct.lat_int = buf.get_i32_le()?;
28069        __struct.lon_int = buf.get_i32_le()?;
28070        __struct.alt = buf.get_f32_le()?;
28071        __struct.vx = buf.get_f32_le()?;
28072        __struct.vy = buf.get_f32_le()?;
28073        __struct.vz = buf.get_f32_le()?;
28074        __struct.afx = buf.get_f32_le()?;
28075        __struct.afy = buf.get_f32_le()?;
28076        __struct.afz = buf.get_f32_le()?;
28077        __struct.yaw = buf.get_f32_le()?;
28078        __struct.yaw_rate = buf.get_f32_le()?;
28079        let tmp = buf.get_u16_le()?;
28080        __struct.type_mask =
28081            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28082                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28083                    flag_type: "PositionTargetTypemask",
28084                    value: tmp as u64,
28085                })?;
28086        __struct.target_system = buf.get_u8()?;
28087        __struct.target_component = buf.get_u8()?;
28088        let tmp = buf.get_u8()?;
28089        __struct.coordinate_frame =
28090            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28091                enum_type: "MavFrame",
28092                value: tmp as u64,
28093            })?;
28094        Ok(__struct)
28095    }
28096    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28097        let mut __tmp = BytesMut::new(bytes);
28098        #[allow(clippy::absurd_extreme_comparisons)]
28099        #[allow(unused_comparisons)]
28100        if __tmp.remaining() < Self::ENCODED_LEN {
28101            panic!(
28102                "buffer is too small (need {} bytes, but got {})",
28103                Self::ENCODED_LEN,
28104                __tmp.remaining(),
28105            )
28106        }
28107        __tmp.put_u32_le(self.time_boot_ms);
28108        __tmp.put_i32_le(self.lat_int);
28109        __tmp.put_i32_le(self.lon_int);
28110        __tmp.put_f32_le(self.alt);
28111        __tmp.put_f32_le(self.vx);
28112        __tmp.put_f32_le(self.vy);
28113        __tmp.put_f32_le(self.vz);
28114        __tmp.put_f32_le(self.afx);
28115        __tmp.put_f32_le(self.afy);
28116        __tmp.put_f32_le(self.afz);
28117        __tmp.put_f32_le(self.yaw);
28118        __tmp.put_f32_le(self.yaw_rate);
28119        __tmp.put_u16_le(self.type_mask.bits() as u16);
28120        __tmp.put_u8(self.target_system);
28121        __tmp.put_u8(self.target_component);
28122        __tmp.put_u8(self.coordinate_frame as u8);
28123        if matches!(version, MavlinkVersion::V2) {
28124            let len = __tmp.len();
28125            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28126        } else {
28127            __tmp.len()
28128        }
28129    }
28130}
28131#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28132#[doc = ""]
28133#[doc = "ID: 84"]
28134#[derive(Debug, Clone, PartialEq)]
28135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28137#[cfg_attr(feature = "ts", derive(TS))]
28138#[cfg_attr(feature = "ts", ts(export))]
28139pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28140    #[doc = "Timestamp (time since system boot)."]
28141    pub time_boot_ms: u32,
28142    #[doc = "X Position in NED frame"]
28143    pub x: f32,
28144    #[doc = "Y Position in NED frame"]
28145    pub y: f32,
28146    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28147    pub z: f32,
28148    #[doc = "X velocity in NED frame"]
28149    pub vx: f32,
28150    #[doc = "Y velocity in NED frame"]
28151    pub vy: f32,
28152    #[doc = "Z velocity in NED frame"]
28153    pub vz: f32,
28154    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28155    pub afx: f32,
28156    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28157    pub afy: f32,
28158    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28159    pub afz: f32,
28160    #[doc = "yaw setpoint"]
28161    pub yaw: f32,
28162    #[doc = "yaw rate setpoint"]
28163    pub yaw_rate: f32,
28164    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28165    pub type_mask: PositionTargetTypemask,
28166    #[doc = "System ID"]
28167    pub target_system: u8,
28168    #[doc = "Component ID"]
28169    pub target_component: u8,
28170    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28171    pub coordinate_frame: MavFrame,
28172}
28173impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28174    pub const ENCODED_LEN: usize = 53usize;
28175    pub const DEFAULT: Self = Self {
28176        time_boot_ms: 0_u32,
28177        x: 0.0_f32,
28178        y: 0.0_f32,
28179        z: 0.0_f32,
28180        vx: 0.0_f32,
28181        vy: 0.0_f32,
28182        vz: 0.0_f32,
28183        afx: 0.0_f32,
28184        afy: 0.0_f32,
28185        afz: 0.0_f32,
28186        yaw: 0.0_f32,
28187        yaw_rate: 0.0_f32,
28188        type_mask: PositionTargetTypemask::DEFAULT,
28189        target_system: 0_u8,
28190        target_component: 0_u8,
28191        coordinate_frame: MavFrame::DEFAULT,
28192    };
28193    #[cfg(feature = "arbitrary")]
28194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28195        use arbitrary::{Arbitrary, Unstructured};
28196        let mut buf = [0u8; 1024];
28197        rng.fill_bytes(&mut buf);
28198        let mut unstructured = Unstructured::new(&buf);
28199        Self::arbitrary(&mut unstructured).unwrap_or_default()
28200    }
28201}
28202impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28203    fn default() -> Self {
28204        Self::DEFAULT.clone()
28205    }
28206}
28207impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28208    type Message = MavMessage;
28209    const ID: u32 = 84u32;
28210    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28211    const EXTRA_CRC: u8 = 143u8;
28212    const ENCODED_LEN: usize = 53usize;
28213    fn deser(
28214        _version: MavlinkVersion,
28215        __input: &[u8],
28216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28217        let avail_len = __input.len();
28218        let mut payload_buf = [0; Self::ENCODED_LEN];
28219        let mut buf = if avail_len < Self::ENCODED_LEN {
28220            payload_buf[0..avail_len].copy_from_slice(__input);
28221            Bytes::new(&payload_buf)
28222        } else {
28223            Bytes::new(__input)
28224        };
28225        let mut __struct = Self::default();
28226        __struct.time_boot_ms = buf.get_u32_le()?;
28227        __struct.x = buf.get_f32_le()?;
28228        __struct.y = buf.get_f32_le()?;
28229        __struct.z = buf.get_f32_le()?;
28230        __struct.vx = buf.get_f32_le()?;
28231        __struct.vy = buf.get_f32_le()?;
28232        __struct.vz = buf.get_f32_le()?;
28233        __struct.afx = buf.get_f32_le()?;
28234        __struct.afy = buf.get_f32_le()?;
28235        __struct.afz = buf.get_f32_le()?;
28236        __struct.yaw = buf.get_f32_le()?;
28237        __struct.yaw_rate = buf.get_f32_le()?;
28238        let tmp = buf.get_u16_le()?;
28239        __struct.type_mask =
28240            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28241                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28242                    flag_type: "PositionTargetTypemask",
28243                    value: tmp as u64,
28244                })?;
28245        __struct.target_system = buf.get_u8()?;
28246        __struct.target_component = buf.get_u8()?;
28247        let tmp = buf.get_u8()?;
28248        __struct.coordinate_frame =
28249            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28250                enum_type: "MavFrame",
28251                value: tmp as u64,
28252            })?;
28253        Ok(__struct)
28254    }
28255    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28256        let mut __tmp = BytesMut::new(bytes);
28257        #[allow(clippy::absurd_extreme_comparisons)]
28258        #[allow(unused_comparisons)]
28259        if __tmp.remaining() < Self::ENCODED_LEN {
28260            panic!(
28261                "buffer is too small (need {} bytes, but got {})",
28262                Self::ENCODED_LEN,
28263                __tmp.remaining(),
28264            )
28265        }
28266        __tmp.put_u32_le(self.time_boot_ms);
28267        __tmp.put_f32_le(self.x);
28268        __tmp.put_f32_le(self.y);
28269        __tmp.put_f32_le(self.z);
28270        __tmp.put_f32_le(self.vx);
28271        __tmp.put_f32_le(self.vy);
28272        __tmp.put_f32_le(self.vz);
28273        __tmp.put_f32_le(self.afx);
28274        __tmp.put_f32_le(self.afy);
28275        __tmp.put_f32_le(self.afz);
28276        __tmp.put_f32_le(self.yaw);
28277        __tmp.put_f32_le(self.yaw_rate);
28278        __tmp.put_u16_le(self.type_mask.bits() as u16);
28279        __tmp.put_u8(self.target_system);
28280        __tmp.put_u8(self.target_component);
28281        __tmp.put_u8(self.coordinate_frame as u8);
28282        if matches!(version, MavlinkVersion::V2) {
28283            let len = __tmp.len();
28284            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28285        } else {
28286            __tmp.len()
28287        }
28288    }
28289}
28290#[doc = "Status of simulation environment, if used."]
28291#[doc = ""]
28292#[doc = "ID: 108"]
28293#[derive(Debug, Clone, PartialEq)]
28294#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28296#[cfg_attr(feature = "ts", derive(TS))]
28297#[cfg_attr(feature = "ts", ts(export))]
28298pub struct SIM_STATE_DATA {
28299    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28300    pub q1: f32,
28301    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28302    pub q2: f32,
28303    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28304    pub q3: f32,
28305    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28306    pub q4: f32,
28307    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28308    pub roll: f32,
28309    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28310    pub pitch: f32,
28311    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28312    pub yaw: f32,
28313    #[doc = "X acceleration"]
28314    pub xacc: f32,
28315    #[doc = "Y acceleration"]
28316    pub yacc: f32,
28317    #[doc = "Z acceleration"]
28318    pub zacc: f32,
28319    #[doc = "Angular speed around X axis"]
28320    pub xgyro: f32,
28321    #[doc = "Angular speed around Y axis"]
28322    pub ygyro: f32,
28323    #[doc = "Angular speed around Z axis"]
28324    pub zgyro: f32,
28325    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28326    pub lat: f32,
28327    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28328    pub lon: f32,
28329    #[doc = "Altitude"]
28330    pub alt: f32,
28331    #[doc = "Horizontal position standard deviation"]
28332    pub std_dev_horz: f32,
28333    #[doc = "Vertical position standard deviation"]
28334    pub std_dev_vert: f32,
28335    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28336    pub vn: f32,
28337    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28338    pub ve: f32,
28339    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28340    pub vd: f32,
28341    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28342    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28343    pub lat_int: i32,
28344    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28345    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28346    pub lon_int: i32,
28347}
28348impl SIM_STATE_DATA {
28349    pub const ENCODED_LEN: usize = 92usize;
28350    pub const DEFAULT: Self = Self {
28351        q1: 0.0_f32,
28352        q2: 0.0_f32,
28353        q3: 0.0_f32,
28354        q4: 0.0_f32,
28355        roll: 0.0_f32,
28356        pitch: 0.0_f32,
28357        yaw: 0.0_f32,
28358        xacc: 0.0_f32,
28359        yacc: 0.0_f32,
28360        zacc: 0.0_f32,
28361        xgyro: 0.0_f32,
28362        ygyro: 0.0_f32,
28363        zgyro: 0.0_f32,
28364        lat: 0.0_f32,
28365        lon: 0.0_f32,
28366        alt: 0.0_f32,
28367        std_dev_horz: 0.0_f32,
28368        std_dev_vert: 0.0_f32,
28369        vn: 0.0_f32,
28370        ve: 0.0_f32,
28371        vd: 0.0_f32,
28372        lat_int: 0_i32,
28373        lon_int: 0_i32,
28374    };
28375    #[cfg(feature = "arbitrary")]
28376    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28377        use arbitrary::{Arbitrary, Unstructured};
28378        let mut buf = [0u8; 1024];
28379        rng.fill_bytes(&mut buf);
28380        let mut unstructured = Unstructured::new(&buf);
28381        Self::arbitrary(&mut unstructured).unwrap_or_default()
28382    }
28383}
28384impl Default for SIM_STATE_DATA {
28385    fn default() -> Self {
28386        Self::DEFAULT.clone()
28387    }
28388}
28389impl MessageData for SIM_STATE_DATA {
28390    type Message = MavMessage;
28391    const ID: u32 = 108u32;
28392    const NAME: &'static str = "SIM_STATE";
28393    const EXTRA_CRC: u8 = 32u8;
28394    const ENCODED_LEN: usize = 92usize;
28395    fn deser(
28396        _version: MavlinkVersion,
28397        __input: &[u8],
28398    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28399        let avail_len = __input.len();
28400        let mut payload_buf = [0; Self::ENCODED_LEN];
28401        let mut buf = if avail_len < Self::ENCODED_LEN {
28402            payload_buf[0..avail_len].copy_from_slice(__input);
28403            Bytes::new(&payload_buf)
28404        } else {
28405            Bytes::new(__input)
28406        };
28407        let mut __struct = Self::default();
28408        __struct.q1 = buf.get_f32_le()?;
28409        __struct.q2 = buf.get_f32_le()?;
28410        __struct.q3 = buf.get_f32_le()?;
28411        __struct.q4 = buf.get_f32_le()?;
28412        __struct.roll = buf.get_f32_le()?;
28413        __struct.pitch = buf.get_f32_le()?;
28414        __struct.yaw = buf.get_f32_le()?;
28415        __struct.xacc = buf.get_f32_le()?;
28416        __struct.yacc = buf.get_f32_le()?;
28417        __struct.zacc = buf.get_f32_le()?;
28418        __struct.xgyro = buf.get_f32_le()?;
28419        __struct.ygyro = buf.get_f32_le()?;
28420        __struct.zgyro = buf.get_f32_le()?;
28421        __struct.lat = buf.get_f32_le()?;
28422        __struct.lon = buf.get_f32_le()?;
28423        __struct.alt = buf.get_f32_le()?;
28424        __struct.std_dev_horz = buf.get_f32_le()?;
28425        __struct.std_dev_vert = buf.get_f32_le()?;
28426        __struct.vn = buf.get_f32_le()?;
28427        __struct.ve = buf.get_f32_le()?;
28428        __struct.vd = buf.get_f32_le()?;
28429        __struct.lat_int = buf.get_i32_le()?;
28430        __struct.lon_int = buf.get_i32_le()?;
28431        Ok(__struct)
28432    }
28433    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28434        let mut __tmp = BytesMut::new(bytes);
28435        #[allow(clippy::absurd_extreme_comparisons)]
28436        #[allow(unused_comparisons)]
28437        if __tmp.remaining() < Self::ENCODED_LEN {
28438            panic!(
28439                "buffer is too small (need {} bytes, but got {})",
28440                Self::ENCODED_LEN,
28441                __tmp.remaining(),
28442            )
28443        }
28444        __tmp.put_f32_le(self.q1);
28445        __tmp.put_f32_le(self.q2);
28446        __tmp.put_f32_le(self.q3);
28447        __tmp.put_f32_le(self.q4);
28448        __tmp.put_f32_le(self.roll);
28449        __tmp.put_f32_le(self.pitch);
28450        __tmp.put_f32_le(self.yaw);
28451        __tmp.put_f32_le(self.xacc);
28452        __tmp.put_f32_le(self.yacc);
28453        __tmp.put_f32_le(self.zacc);
28454        __tmp.put_f32_le(self.xgyro);
28455        __tmp.put_f32_le(self.ygyro);
28456        __tmp.put_f32_le(self.zgyro);
28457        __tmp.put_f32_le(self.lat);
28458        __tmp.put_f32_le(self.lon);
28459        __tmp.put_f32_le(self.alt);
28460        __tmp.put_f32_le(self.std_dev_horz);
28461        __tmp.put_f32_le(self.std_dev_vert);
28462        __tmp.put_f32_le(self.vn);
28463        __tmp.put_f32_le(self.ve);
28464        __tmp.put_f32_le(self.vd);
28465        if matches!(version, MavlinkVersion::V2) {
28466            __tmp.put_i32_le(self.lat_int);
28467            __tmp.put_i32_le(self.lon_int);
28468            let len = __tmp.len();
28469            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28470        } else {
28471            __tmp.len()
28472        }
28473    }
28474}
28475#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28476#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28477#[doc = ""]
28478#[doc = "ID: 370"]
28479#[derive(Debug, Clone, PartialEq)]
28480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28482#[cfg_attr(feature = "ts", derive(TS))]
28483#[cfg_attr(feature = "ts", ts(export))]
28484pub struct SMART_BATTERY_INFO_DATA {
28485    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28486    pub capacity_full_specification: i32,
28487    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28488    pub capacity_full: i32,
28489    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28490    pub cycle_count: u16,
28491    #[doc = "Battery weight. 0: field not provided."]
28492    pub weight: u16,
28493    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
28494    pub discharge_minimum_voltage: u16,
28495    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
28496    pub charging_minimum_voltage: u16,
28497    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
28498    pub resting_minimum_voltage: u16,
28499    #[doc = "Battery ID"]
28500    pub id: u8,
28501    #[doc = "Function of the battery"]
28502    pub battery_function: MavBatteryFunction,
28503    #[doc = "Type (chemistry) of the battery"]
28504    pub mavtype: MavBatteryType,
28505    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
28506    #[cfg_attr(feature = "ts", ts(type = "string"))]
28507    pub serial_number: CharArray<16>,
28508    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
28509    #[cfg_attr(feature = "ts", ts(type = "string"))]
28510    pub device_name: CharArray<50>,
28511    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
28512    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28513    pub charging_maximum_voltage: u16,
28514    #[doc = "Number of battery cells in series. 0: field not provided."]
28515    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28516    pub cells_in_series: u8,
28517    #[doc = "Maximum pack discharge current. 0: field not provided."]
28518    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28519    pub discharge_maximum_current: u32,
28520    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
28521    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28522    pub discharge_maximum_burst_current: u32,
28523    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
28524    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28525    #[cfg_attr(feature = "ts", ts(type = "string"))]
28526    pub manufacture_date: CharArray<11>,
28527}
28528impl SMART_BATTERY_INFO_DATA {
28529    pub const ENCODED_LEN: usize = 109usize;
28530    pub const DEFAULT: Self = Self {
28531        capacity_full_specification: 0_i32,
28532        capacity_full: 0_i32,
28533        cycle_count: 0_u16,
28534        weight: 0_u16,
28535        discharge_minimum_voltage: 0_u16,
28536        charging_minimum_voltage: 0_u16,
28537        resting_minimum_voltage: 0_u16,
28538        id: 0_u8,
28539        battery_function: MavBatteryFunction::DEFAULT,
28540        mavtype: MavBatteryType::DEFAULT,
28541        serial_number: CharArray::new([0_u8; 16usize]),
28542        device_name: CharArray::new([0_u8; 50usize]),
28543        charging_maximum_voltage: 0_u16,
28544        cells_in_series: 0_u8,
28545        discharge_maximum_current: 0_u32,
28546        discharge_maximum_burst_current: 0_u32,
28547        manufacture_date: CharArray::new([0_u8; 11usize]),
28548    };
28549    #[cfg(feature = "arbitrary")]
28550    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28551        use arbitrary::{Arbitrary, Unstructured};
28552        let mut buf = [0u8; 1024];
28553        rng.fill_bytes(&mut buf);
28554        let mut unstructured = Unstructured::new(&buf);
28555        Self::arbitrary(&mut unstructured).unwrap_or_default()
28556    }
28557}
28558impl Default for SMART_BATTERY_INFO_DATA {
28559    fn default() -> Self {
28560        Self::DEFAULT.clone()
28561    }
28562}
28563impl MessageData for SMART_BATTERY_INFO_DATA {
28564    type Message = MavMessage;
28565    const ID: u32 = 370u32;
28566    const NAME: &'static str = "SMART_BATTERY_INFO";
28567    const EXTRA_CRC: u8 = 75u8;
28568    const ENCODED_LEN: usize = 109usize;
28569    fn deser(
28570        _version: MavlinkVersion,
28571        __input: &[u8],
28572    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28573        let avail_len = __input.len();
28574        let mut payload_buf = [0; Self::ENCODED_LEN];
28575        let mut buf = if avail_len < Self::ENCODED_LEN {
28576            payload_buf[0..avail_len].copy_from_slice(__input);
28577            Bytes::new(&payload_buf)
28578        } else {
28579            Bytes::new(__input)
28580        };
28581        let mut __struct = Self::default();
28582        __struct.capacity_full_specification = buf.get_i32_le()?;
28583        __struct.capacity_full = buf.get_i32_le()?;
28584        __struct.cycle_count = buf.get_u16_le()?;
28585        __struct.weight = buf.get_u16_le()?;
28586        __struct.discharge_minimum_voltage = buf.get_u16_le()?;
28587        __struct.charging_minimum_voltage = buf.get_u16_le()?;
28588        __struct.resting_minimum_voltage = buf.get_u16_le()?;
28589        __struct.id = buf.get_u8()?;
28590        let tmp = buf.get_u8()?;
28591        __struct.battery_function =
28592            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28593                enum_type: "MavBatteryFunction",
28594                value: tmp as u64,
28595            })?;
28596        let tmp = buf.get_u8()?;
28597        __struct.mavtype =
28598            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28599                enum_type: "MavBatteryType",
28600                value: tmp as u64,
28601            })?;
28602        let mut tmp = [0_u8; 16usize];
28603        for v in &mut tmp {
28604            *v = buf.get_u8()?;
28605        }
28606        __struct.serial_number = CharArray::new(tmp);
28607        let mut tmp = [0_u8; 50usize];
28608        for v in &mut tmp {
28609            *v = buf.get_u8()?;
28610        }
28611        __struct.device_name = CharArray::new(tmp);
28612        __struct.charging_maximum_voltage = buf.get_u16_le()?;
28613        __struct.cells_in_series = buf.get_u8()?;
28614        __struct.discharge_maximum_current = buf.get_u32_le()?;
28615        __struct.discharge_maximum_burst_current = buf.get_u32_le()?;
28616        let mut tmp = [0_u8; 11usize];
28617        for v in &mut tmp {
28618            *v = buf.get_u8()?;
28619        }
28620        __struct.manufacture_date = CharArray::new(tmp);
28621        Ok(__struct)
28622    }
28623    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28624        let mut __tmp = BytesMut::new(bytes);
28625        #[allow(clippy::absurd_extreme_comparisons)]
28626        #[allow(unused_comparisons)]
28627        if __tmp.remaining() < Self::ENCODED_LEN {
28628            panic!(
28629                "buffer is too small (need {} bytes, but got {})",
28630                Self::ENCODED_LEN,
28631                __tmp.remaining(),
28632            )
28633        }
28634        __tmp.put_i32_le(self.capacity_full_specification);
28635        __tmp.put_i32_le(self.capacity_full);
28636        __tmp.put_u16_le(self.cycle_count);
28637        __tmp.put_u16_le(self.weight);
28638        __tmp.put_u16_le(self.discharge_minimum_voltage);
28639        __tmp.put_u16_le(self.charging_minimum_voltage);
28640        __tmp.put_u16_le(self.resting_minimum_voltage);
28641        __tmp.put_u8(self.id);
28642        __tmp.put_u8(self.battery_function as u8);
28643        __tmp.put_u8(self.mavtype as u8);
28644        for val in &self.serial_number {
28645            __tmp.put_u8(*val);
28646        }
28647        for val in &self.device_name {
28648            __tmp.put_u8(*val);
28649        }
28650        if matches!(version, MavlinkVersion::V2) {
28651            __tmp.put_u16_le(self.charging_maximum_voltage);
28652            __tmp.put_u8(self.cells_in_series);
28653            __tmp.put_u32_le(self.discharge_maximum_current);
28654            __tmp.put_u32_le(self.discharge_maximum_burst_current);
28655            for val in &self.manufacture_date {
28656                __tmp.put_u8(*val);
28657            }
28658            let len = __tmp.len();
28659            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28660        } else {
28661            __tmp.len()
28662        }
28663    }
28664}
28665#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
28666#[doc = ""]
28667#[doc = "ID: 253"]
28668#[derive(Debug, Clone, PartialEq)]
28669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28671#[cfg_attr(feature = "ts", derive(TS))]
28672#[cfg_attr(feature = "ts", ts(export))]
28673pub struct STATUSTEXT_DATA {
28674    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
28675    pub severity: MavSeverity,
28676    #[doc = "Status text message, without null termination character"]
28677    #[cfg_attr(feature = "ts", ts(type = "string"))]
28678    pub text: CharArray<50>,
28679    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
28680    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28681    pub id: u16,
28682    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
28683    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28684    pub chunk_seq: u8,
28685}
28686impl STATUSTEXT_DATA {
28687    pub const ENCODED_LEN: usize = 54usize;
28688    pub const DEFAULT: Self = Self {
28689        severity: MavSeverity::DEFAULT,
28690        text: CharArray::new([0_u8; 50usize]),
28691        id: 0_u16,
28692        chunk_seq: 0_u8,
28693    };
28694    #[cfg(feature = "arbitrary")]
28695    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28696        use arbitrary::{Arbitrary, Unstructured};
28697        let mut buf = [0u8; 1024];
28698        rng.fill_bytes(&mut buf);
28699        let mut unstructured = Unstructured::new(&buf);
28700        Self::arbitrary(&mut unstructured).unwrap_or_default()
28701    }
28702}
28703impl Default for STATUSTEXT_DATA {
28704    fn default() -> Self {
28705        Self::DEFAULT.clone()
28706    }
28707}
28708impl MessageData for STATUSTEXT_DATA {
28709    type Message = MavMessage;
28710    const ID: u32 = 253u32;
28711    const NAME: &'static str = "STATUSTEXT";
28712    const EXTRA_CRC: u8 = 83u8;
28713    const ENCODED_LEN: usize = 54usize;
28714    fn deser(
28715        _version: MavlinkVersion,
28716        __input: &[u8],
28717    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28718        let avail_len = __input.len();
28719        let mut payload_buf = [0; Self::ENCODED_LEN];
28720        let mut buf = if avail_len < Self::ENCODED_LEN {
28721            payload_buf[0..avail_len].copy_from_slice(__input);
28722            Bytes::new(&payload_buf)
28723        } else {
28724            Bytes::new(__input)
28725        };
28726        let mut __struct = Self::default();
28727        let tmp = buf.get_u8()?;
28728        __struct.severity =
28729            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28730                enum_type: "MavSeverity",
28731                value: tmp as u64,
28732            })?;
28733        let mut tmp = [0_u8; 50usize];
28734        for v in &mut tmp {
28735            *v = buf.get_u8()?;
28736        }
28737        __struct.text = CharArray::new(tmp);
28738        __struct.id = buf.get_u16_le()?;
28739        __struct.chunk_seq = buf.get_u8()?;
28740        Ok(__struct)
28741    }
28742    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28743        let mut __tmp = BytesMut::new(bytes);
28744        #[allow(clippy::absurd_extreme_comparisons)]
28745        #[allow(unused_comparisons)]
28746        if __tmp.remaining() < Self::ENCODED_LEN {
28747            panic!(
28748                "buffer is too small (need {} bytes, but got {})",
28749                Self::ENCODED_LEN,
28750                __tmp.remaining(),
28751            )
28752        }
28753        __tmp.put_u8(self.severity as u8);
28754        for val in &self.text {
28755            __tmp.put_u8(*val);
28756        }
28757        if matches!(version, MavlinkVersion::V2) {
28758            __tmp.put_u16_le(self.id);
28759            __tmp.put_u8(self.chunk_seq);
28760            let len = __tmp.len();
28761            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28762        } else {
28763            __tmp.len()
28764        }
28765    }
28766}
28767#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
28768#[doc = ""]
28769#[doc = "ID: 261"]
28770#[derive(Debug, Clone, PartialEq)]
28771#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28772#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28773#[cfg_attr(feature = "ts", derive(TS))]
28774#[cfg_attr(feature = "ts", ts(export))]
28775pub struct STORAGE_INFORMATION_DATA {
28776    #[doc = "Timestamp (time since system boot)."]
28777    pub time_boot_ms: u32,
28778    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28779    pub total_capacity: f32,
28780    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28781    pub used_capacity: f32,
28782    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28783    pub available_capacity: f32,
28784    #[doc = "Read speed."]
28785    pub read_speed: f32,
28786    #[doc = "Write speed."]
28787    pub write_speed: f32,
28788    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
28789    pub storage_id: u8,
28790    #[doc = "Number of storage devices"]
28791    pub storage_count: u8,
28792    #[doc = "Status of storage"]
28793    pub status: StorageStatus,
28794    #[doc = "Type of storage"]
28795    #[cfg_attr(feature = "serde", serde(default))]
28796    pub mavtype: StorageType,
28797    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
28798    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28799    #[cfg_attr(feature = "ts", ts(type = "string"))]
28800    pub name: CharArray<32>,
28801    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
28802    #[cfg_attr(feature = "serde", serde(default))]
28803    pub storage_usage: StorageUsageFlag,
28804}
28805impl STORAGE_INFORMATION_DATA {
28806    pub const ENCODED_LEN: usize = 61usize;
28807    pub const DEFAULT: Self = Self {
28808        time_boot_ms: 0_u32,
28809        total_capacity: 0.0_f32,
28810        used_capacity: 0.0_f32,
28811        available_capacity: 0.0_f32,
28812        read_speed: 0.0_f32,
28813        write_speed: 0.0_f32,
28814        storage_id: 0_u8,
28815        storage_count: 0_u8,
28816        status: StorageStatus::DEFAULT,
28817        mavtype: StorageType::DEFAULT,
28818        name: CharArray::new([0_u8; 32usize]),
28819        storage_usage: StorageUsageFlag::DEFAULT,
28820    };
28821    #[cfg(feature = "arbitrary")]
28822    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28823        use arbitrary::{Arbitrary, Unstructured};
28824        let mut buf = [0u8; 1024];
28825        rng.fill_bytes(&mut buf);
28826        let mut unstructured = Unstructured::new(&buf);
28827        Self::arbitrary(&mut unstructured).unwrap_or_default()
28828    }
28829}
28830impl Default for STORAGE_INFORMATION_DATA {
28831    fn default() -> Self {
28832        Self::DEFAULT.clone()
28833    }
28834}
28835impl MessageData for STORAGE_INFORMATION_DATA {
28836    type Message = MavMessage;
28837    const ID: u32 = 261u32;
28838    const NAME: &'static str = "STORAGE_INFORMATION";
28839    const EXTRA_CRC: u8 = 179u8;
28840    const ENCODED_LEN: usize = 61usize;
28841    fn deser(
28842        _version: MavlinkVersion,
28843        __input: &[u8],
28844    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28845        let avail_len = __input.len();
28846        let mut payload_buf = [0; Self::ENCODED_LEN];
28847        let mut buf = if avail_len < Self::ENCODED_LEN {
28848            payload_buf[0..avail_len].copy_from_slice(__input);
28849            Bytes::new(&payload_buf)
28850        } else {
28851            Bytes::new(__input)
28852        };
28853        let mut __struct = Self::default();
28854        __struct.time_boot_ms = buf.get_u32_le()?;
28855        __struct.total_capacity = buf.get_f32_le()?;
28856        __struct.used_capacity = buf.get_f32_le()?;
28857        __struct.available_capacity = buf.get_f32_le()?;
28858        __struct.read_speed = buf.get_f32_le()?;
28859        __struct.write_speed = buf.get_f32_le()?;
28860        __struct.storage_id = buf.get_u8()?;
28861        __struct.storage_count = buf.get_u8()?;
28862        let tmp = buf.get_u8()?;
28863        __struct.status =
28864            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28865                enum_type: "StorageStatus",
28866                value: tmp as u64,
28867            })?;
28868        let tmp = buf.get_u8()?;
28869        __struct.mavtype =
28870            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28871                enum_type: "StorageType",
28872                value: tmp as u64,
28873            })?;
28874        let mut tmp = [0_u8; 32usize];
28875        for v in &mut tmp {
28876            *v = buf.get_u8()?;
28877        }
28878        __struct.name = CharArray::new(tmp);
28879        let tmp = buf.get_u8()?;
28880        __struct.storage_usage = StorageUsageFlag::from_bits(
28881            tmp as <StorageUsageFlag as Flags>::Bits,
28882        )
28883        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28884            flag_type: "StorageUsageFlag",
28885            value: tmp as u64,
28886        })?;
28887        Ok(__struct)
28888    }
28889    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28890        let mut __tmp = BytesMut::new(bytes);
28891        #[allow(clippy::absurd_extreme_comparisons)]
28892        #[allow(unused_comparisons)]
28893        if __tmp.remaining() < Self::ENCODED_LEN {
28894            panic!(
28895                "buffer is too small (need {} bytes, but got {})",
28896                Self::ENCODED_LEN,
28897                __tmp.remaining(),
28898            )
28899        }
28900        __tmp.put_u32_le(self.time_boot_ms);
28901        __tmp.put_f32_le(self.total_capacity);
28902        __tmp.put_f32_le(self.used_capacity);
28903        __tmp.put_f32_le(self.available_capacity);
28904        __tmp.put_f32_le(self.read_speed);
28905        __tmp.put_f32_le(self.write_speed);
28906        __tmp.put_u8(self.storage_id);
28907        __tmp.put_u8(self.storage_count);
28908        __tmp.put_u8(self.status as u8);
28909        if matches!(version, MavlinkVersion::V2) {
28910            __tmp.put_u8(self.mavtype as u8);
28911            for val in &self.name {
28912                __tmp.put_u8(*val);
28913            }
28914            __tmp.put_u8(self.storage_usage.bits() as u8);
28915            let len = __tmp.len();
28916            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28917        } else {
28918            __tmp.len()
28919        }
28920    }
28921}
28922#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
28923#[doc = ""]
28924#[doc = "ID: 401"]
28925#[derive(Debug, Clone, PartialEq)]
28926#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28927#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28928#[cfg_attr(feature = "ts", derive(TS))]
28929#[cfg_attr(feature = "ts", ts(export))]
28930pub struct SUPPORTED_TUNES_DATA {
28931    #[doc = "Bitfield of supported tune formats."]
28932    pub format: TuneFormat,
28933    #[doc = "System ID"]
28934    pub target_system: u8,
28935    #[doc = "Component ID"]
28936    pub target_component: u8,
28937}
28938impl SUPPORTED_TUNES_DATA {
28939    pub const ENCODED_LEN: usize = 6usize;
28940    pub const DEFAULT: Self = Self {
28941        format: TuneFormat::DEFAULT,
28942        target_system: 0_u8,
28943        target_component: 0_u8,
28944    };
28945    #[cfg(feature = "arbitrary")]
28946    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28947        use arbitrary::{Arbitrary, Unstructured};
28948        let mut buf = [0u8; 1024];
28949        rng.fill_bytes(&mut buf);
28950        let mut unstructured = Unstructured::new(&buf);
28951        Self::arbitrary(&mut unstructured).unwrap_or_default()
28952    }
28953}
28954impl Default for SUPPORTED_TUNES_DATA {
28955    fn default() -> Self {
28956        Self::DEFAULT.clone()
28957    }
28958}
28959impl MessageData for SUPPORTED_TUNES_DATA {
28960    type Message = MavMessage;
28961    const ID: u32 = 401u32;
28962    const NAME: &'static str = "SUPPORTED_TUNES";
28963    const EXTRA_CRC: u8 = 183u8;
28964    const ENCODED_LEN: usize = 6usize;
28965    fn deser(
28966        _version: MavlinkVersion,
28967        __input: &[u8],
28968    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28969        let avail_len = __input.len();
28970        let mut payload_buf = [0; Self::ENCODED_LEN];
28971        let mut buf = if avail_len < Self::ENCODED_LEN {
28972            payload_buf[0..avail_len].copy_from_slice(__input);
28973            Bytes::new(&payload_buf)
28974        } else {
28975            Bytes::new(__input)
28976        };
28977        let mut __struct = Self::default();
28978        let tmp = buf.get_u32_le()?;
28979        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
28980            ::mavlink_core::error::ParserError::InvalidEnum {
28981                enum_type: "TuneFormat",
28982                value: tmp as u64,
28983            },
28984        )?;
28985        __struct.target_system = buf.get_u8()?;
28986        __struct.target_component = buf.get_u8()?;
28987        Ok(__struct)
28988    }
28989    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28990        let mut __tmp = BytesMut::new(bytes);
28991        #[allow(clippy::absurd_extreme_comparisons)]
28992        #[allow(unused_comparisons)]
28993        if __tmp.remaining() < Self::ENCODED_LEN {
28994            panic!(
28995                "buffer is too small (need {} bytes, but got {})",
28996                Self::ENCODED_LEN,
28997                __tmp.remaining(),
28998            )
28999        }
29000        __tmp.put_u32_le(self.format as u32);
29001        __tmp.put_u8(self.target_system);
29002        __tmp.put_u8(self.target_component);
29003        if matches!(version, MavlinkVersion::V2) {
29004            let len = __tmp.len();
29005            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29006        } else {
29007            __tmp.len()
29008        }
29009    }
29010}
29011#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29012#[doc = ""]
29013#[doc = "ID: 2"]
29014#[derive(Debug, Clone, PartialEq)]
29015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29017#[cfg_attr(feature = "ts", derive(TS))]
29018#[cfg_attr(feature = "ts", ts(export))]
29019pub struct SYSTEM_TIME_DATA {
29020    #[doc = "Timestamp (UNIX epoch time)."]
29021    pub time_unix_usec: u64,
29022    #[doc = "Timestamp (time since system boot)."]
29023    pub time_boot_ms: u32,
29024}
29025impl SYSTEM_TIME_DATA {
29026    pub const ENCODED_LEN: usize = 12usize;
29027    pub const DEFAULT: Self = Self {
29028        time_unix_usec: 0_u64,
29029        time_boot_ms: 0_u32,
29030    };
29031    #[cfg(feature = "arbitrary")]
29032    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29033        use arbitrary::{Arbitrary, Unstructured};
29034        let mut buf = [0u8; 1024];
29035        rng.fill_bytes(&mut buf);
29036        let mut unstructured = Unstructured::new(&buf);
29037        Self::arbitrary(&mut unstructured).unwrap_or_default()
29038    }
29039}
29040impl Default for SYSTEM_TIME_DATA {
29041    fn default() -> Self {
29042        Self::DEFAULT.clone()
29043    }
29044}
29045impl MessageData for SYSTEM_TIME_DATA {
29046    type Message = MavMessage;
29047    const ID: u32 = 2u32;
29048    const NAME: &'static str = "SYSTEM_TIME";
29049    const EXTRA_CRC: u8 = 137u8;
29050    const ENCODED_LEN: usize = 12usize;
29051    fn deser(
29052        _version: MavlinkVersion,
29053        __input: &[u8],
29054    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29055        let avail_len = __input.len();
29056        let mut payload_buf = [0; Self::ENCODED_LEN];
29057        let mut buf = if avail_len < Self::ENCODED_LEN {
29058            payload_buf[0..avail_len].copy_from_slice(__input);
29059            Bytes::new(&payload_buf)
29060        } else {
29061            Bytes::new(__input)
29062        };
29063        let mut __struct = Self::default();
29064        __struct.time_unix_usec = buf.get_u64_le()?;
29065        __struct.time_boot_ms = buf.get_u32_le()?;
29066        Ok(__struct)
29067    }
29068    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29069        let mut __tmp = BytesMut::new(bytes);
29070        #[allow(clippy::absurd_extreme_comparisons)]
29071        #[allow(unused_comparisons)]
29072        if __tmp.remaining() < Self::ENCODED_LEN {
29073            panic!(
29074                "buffer is too small (need {} bytes, but got {})",
29075                Self::ENCODED_LEN,
29076                __tmp.remaining(),
29077            )
29078        }
29079        __tmp.put_u64_le(self.time_unix_usec);
29080        __tmp.put_u32_le(self.time_boot_ms);
29081        if matches!(version, MavlinkVersion::V2) {
29082            let len = __tmp.len();
29083            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29084        } else {
29085            __tmp.len()
29086        }
29087    }
29088}
29089#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29090#[doc = ""]
29091#[doc = "ID: 1"]
29092#[derive(Debug, Clone, PartialEq)]
29093#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29094#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29095#[cfg_attr(feature = "ts", derive(TS))]
29096#[cfg_attr(feature = "ts", ts(export))]
29097pub struct SYS_STATUS_DATA {
29098    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29099    pub onboard_control_sensors_present: MavSysStatusSensor,
29100    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29101    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29102    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29103    pub onboard_control_sensors_health: MavSysStatusSensor,
29104    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29105    pub load: u16,
29106    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29107    pub voltage_battery: u16,
29108    #[doc = "Battery current, -1: Current not sent by autopilot"]
29109    pub current_battery: i16,
29110    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29111    pub drop_rate_comm: u16,
29112    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29113    pub errors_comm: u16,
29114    #[doc = "Autopilot-specific errors"]
29115    pub errors_count1: u16,
29116    #[doc = "Autopilot-specific errors"]
29117    pub errors_count2: u16,
29118    #[doc = "Autopilot-specific errors"]
29119    pub errors_count3: u16,
29120    #[doc = "Autopilot-specific errors"]
29121    pub errors_count4: u16,
29122    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29123    pub battery_remaining: i8,
29124    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29125    #[cfg_attr(feature = "serde", serde(default))]
29126    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29127    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29128    #[cfg_attr(feature = "serde", serde(default))]
29129    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29130    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29131    #[cfg_attr(feature = "serde", serde(default))]
29132    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29133}
29134impl SYS_STATUS_DATA {
29135    pub const ENCODED_LEN: usize = 43usize;
29136    pub const DEFAULT: Self = Self {
29137        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29138        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29139        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29140        load: 0_u16,
29141        voltage_battery: 0_u16,
29142        current_battery: 0_i16,
29143        drop_rate_comm: 0_u16,
29144        errors_comm: 0_u16,
29145        errors_count1: 0_u16,
29146        errors_count2: 0_u16,
29147        errors_count3: 0_u16,
29148        errors_count4: 0_u16,
29149        battery_remaining: 0_i8,
29150        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29151        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29152        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29153    };
29154    #[cfg(feature = "arbitrary")]
29155    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29156        use arbitrary::{Arbitrary, Unstructured};
29157        let mut buf = [0u8; 1024];
29158        rng.fill_bytes(&mut buf);
29159        let mut unstructured = Unstructured::new(&buf);
29160        Self::arbitrary(&mut unstructured).unwrap_or_default()
29161    }
29162}
29163impl Default for SYS_STATUS_DATA {
29164    fn default() -> Self {
29165        Self::DEFAULT.clone()
29166    }
29167}
29168impl MessageData for SYS_STATUS_DATA {
29169    type Message = MavMessage;
29170    const ID: u32 = 1u32;
29171    const NAME: &'static str = "SYS_STATUS";
29172    const EXTRA_CRC: u8 = 124u8;
29173    const ENCODED_LEN: usize = 43usize;
29174    fn deser(
29175        _version: MavlinkVersion,
29176        __input: &[u8],
29177    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29178        let avail_len = __input.len();
29179        let mut payload_buf = [0; Self::ENCODED_LEN];
29180        let mut buf = if avail_len < Self::ENCODED_LEN {
29181            payload_buf[0..avail_len].copy_from_slice(__input);
29182            Bytes::new(&payload_buf)
29183        } else {
29184            Bytes::new(__input)
29185        };
29186        let mut __struct = Self::default();
29187        let tmp = buf.get_u32_le()?;
29188        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29189            tmp as <MavSysStatusSensor as Flags>::Bits,
29190        )
29191        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29192            flag_type: "MavSysStatusSensor",
29193            value: tmp as u64,
29194        })?;
29195        let tmp = buf.get_u32_le()?;
29196        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29197            tmp as <MavSysStatusSensor as Flags>::Bits,
29198        )
29199        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29200            flag_type: "MavSysStatusSensor",
29201            value: tmp as u64,
29202        })?;
29203        let tmp = buf.get_u32_le()?;
29204        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29205            tmp as <MavSysStatusSensor as Flags>::Bits,
29206        )
29207        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29208            flag_type: "MavSysStatusSensor",
29209            value: tmp as u64,
29210        })?;
29211        __struct.load = buf.get_u16_le()?;
29212        __struct.voltage_battery = buf.get_u16_le()?;
29213        __struct.current_battery = buf.get_i16_le()?;
29214        __struct.drop_rate_comm = buf.get_u16_le()?;
29215        __struct.errors_comm = buf.get_u16_le()?;
29216        __struct.errors_count1 = buf.get_u16_le()?;
29217        __struct.errors_count2 = buf.get_u16_le()?;
29218        __struct.errors_count3 = buf.get_u16_le()?;
29219        __struct.errors_count4 = buf.get_u16_le()?;
29220        __struct.battery_remaining = buf.get_i8()?;
29221        let tmp = buf.get_u32_le()?;
29222        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
29223            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29224        )
29225        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29226            flag_type: "MavSysStatusSensorExtended",
29227            value: tmp as u64,
29228        })?;
29229        let tmp = buf.get_u32_le()?;
29230        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
29231            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29232        )
29233        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29234            flag_type: "MavSysStatusSensorExtended",
29235            value: tmp as u64,
29236        })?;
29237        let tmp = buf.get_u32_le()?;
29238        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
29239            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29240        )
29241        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29242            flag_type: "MavSysStatusSensorExtended",
29243            value: tmp as u64,
29244        })?;
29245        Ok(__struct)
29246    }
29247    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29248        let mut __tmp = BytesMut::new(bytes);
29249        #[allow(clippy::absurd_extreme_comparisons)]
29250        #[allow(unused_comparisons)]
29251        if __tmp.remaining() < Self::ENCODED_LEN {
29252            panic!(
29253                "buffer is too small (need {} bytes, but got {})",
29254                Self::ENCODED_LEN,
29255                __tmp.remaining(),
29256            )
29257        }
29258        __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
29259        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
29260        __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
29261        __tmp.put_u16_le(self.load);
29262        __tmp.put_u16_le(self.voltage_battery);
29263        __tmp.put_i16_le(self.current_battery);
29264        __tmp.put_u16_le(self.drop_rate_comm);
29265        __tmp.put_u16_le(self.errors_comm);
29266        __tmp.put_u16_le(self.errors_count1);
29267        __tmp.put_u16_le(self.errors_count2);
29268        __tmp.put_u16_le(self.errors_count3);
29269        __tmp.put_u16_le(self.errors_count4);
29270        __tmp.put_i8(self.battery_remaining);
29271        if matches!(version, MavlinkVersion::V2) {
29272            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
29273            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
29274            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
29275            let len = __tmp.len();
29276            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29277        } else {
29278            __tmp.len()
29279        }
29280    }
29281}
29282#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29283#[doc = ""]
29284#[doc = "ID: 135"]
29285#[derive(Debug, Clone, PartialEq)]
29286#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29288#[cfg_attr(feature = "ts", derive(TS))]
29289#[cfg_attr(feature = "ts", ts(export))]
29290pub struct TERRAIN_CHECK_DATA {
29291    #[doc = "Latitude"]
29292    pub lat: i32,
29293    #[doc = "Longitude"]
29294    pub lon: i32,
29295}
29296impl TERRAIN_CHECK_DATA {
29297    pub const ENCODED_LEN: usize = 8usize;
29298    pub const DEFAULT: Self = Self {
29299        lat: 0_i32,
29300        lon: 0_i32,
29301    };
29302    #[cfg(feature = "arbitrary")]
29303    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29304        use arbitrary::{Arbitrary, Unstructured};
29305        let mut buf = [0u8; 1024];
29306        rng.fill_bytes(&mut buf);
29307        let mut unstructured = Unstructured::new(&buf);
29308        Self::arbitrary(&mut unstructured).unwrap_or_default()
29309    }
29310}
29311impl Default for TERRAIN_CHECK_DATA {
29312    fn default() -> Self {
29313        Self::DEFAULT.clone()
29314    }
29315}
29316impl MessageData for TERRAIN_CHECK_DATA {
29317    type Message = MavMessage;
29318    const ID: u32 = 135u32;
29319    const NAME: &'static str = "TERRAIN_CHECK";
29320    const EXTRA_CRC: u8 = 203u8;
29321    const ENCODED_LEN: usize = 8usize;
29322    fn deser(
29323        _version: MavlinkVersion,
29324        __input: &[u8],
29325    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29326        let avail_len = __input.len();
29327        let mut payload_buf = [0; Self::ENCODED_LEN];
29328        let mut buf = if avail_len < Self::ENCODED_LEN {
29329            payload_buf[0..avail_len].copy_from_slice(__input);
29330            Bytes::new(&payload_buf)
29331        } else {
29332            Bytes::new(__input)
29333        };
29334        let mut __struct = Self::default();
29335        __struct.lat = buf.get_i32_le()?;
29336        __struct.lon = buf.get_i32_le()?;
29337        Ok(__struct)
29338    }
29339    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29340        let mut __tmp = BytesMut::new(bytes);
29341        #[allow(clippy::absurd_extreme_comparisons)]
29342        #[allow(unused_comparisons)]
29343        if __tmp.remaining() < Self::ENCODED_LEN {
29344            panic!(
29345                "buffer is too small (need {} bytes, but got {})",
29346                Self::ENCODED_LEN,
29347                __tmp.remaining(),
29348            )
29349        }
29350        __tmp.put_i32_le(self.lat);
29351        __tmp.put_i32_le(self.lon);
29352        if matches!(version, MavlinkVersion::V2) {
29353            let len = __tmp.len();
29354            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29355        } else {
29356            __tmp.len()
29357        }
29358    }
29359}
29360#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29361#[doc = ""]
29362#[doc = "ID: 134"]
29363#[derive(Debug, Clone, PartialEq)]
29364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29366#[cfg_attr(feature = "ts", derive(TS))]
29367#[cfg_attr(feature = "ts", ts(export))]
29368pub struct TERRAIN_DATA_DATA {
29369    #[doc = "Latitude of SW corner of first grid"]
29370    pub lat: i32,
29371    #[doc = "Longitude of SW corner of first grid"]
29372    pub lon: i32,
29373    #[doc = "Grid spacing"]
29374    pub grid_spacing: u16,
29375    #[doc = "Terrain data MSL"]
29376    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29377    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29378    pub data: [i16; 16],
29379    #[doc = "bit within the terrain request mask"]
29380    pub gridbit: u8,
29381}
29382impl TERRAIN_DATA_DATA {
29383    pub const ENCODED_LEN: usize = 43usize;
29384    pub const DEFAULT: Self = Self {
29385        lat: 0_i32,
29386        lon: 0_i32,
29387        grid_spacing: 0_u16,
29388        data: [0_i16; 16usize],
29389        gridbit: 0_u8,
29390    };
29391    #[cfg(feature = "arbitrary")]
29392    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29393        use arbitrary::{Arbitrary, Unstructured};
29394        let mut buf = [0u8; 1024];
29395        rng.fill_bytes(&mut buf);
29396        let mut unstructured = Unstructured::new(&buf);
29397        Self::arbitrary(&mut unstructured).unwrap_or_default()
29398    }
29399}
29400impl Default for TERRAIN_DATA_DATA {
29401    fn default() -> Self {
29402        Self::DEFAULT.clone()
29403    }
29404}
29405impl MessageData for TERRAIN_DATA_DATA {
29406    type Message = MavMessage;
29407    const ID: u32 = 134u32;
29408    const NAME: &'static str = "TERRAIN_DATA";
29409    const EXTRA_CRC: u8 = 229u8;
29410    const ENCODED_LEN: usize = 43usize;
29411    fn deser(
29412        _version: MavlinkVersion,
29413        __input: &[u8],
29414    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29415        let avail_len = __input.len();
29416        let mut payload_buf = [0; Self::ENCODED_LEN];
29417        let mut buf = if avail_len < Self::ENCODED_LEN {
29418            payload_buf[0..avail_len].copy_from_slice(__input);
29419            Bytes::new(&payload_buf)
29420        } else {
29421            Bytes::new(__input)
29422        };
29423        let mut __struct = Self::default();
29424        __struct.lat = buf.get_i32_le()?;
29425        __struct.lon = buf.get_i32_le()?;
29426        __struct.grid_spacing = buf.get_u16_le()?;
29427        for v in &mut __struct.data {
29428            let val = buf.get_i16_le()?;
29429            *v = val;
29430        }
29431        __struct.gridbit = buf.get_u8()?;
29432        Ok(__struct)
29433    }
29434    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29435        let mut __tmp = BytesMut::new(bytes);
29436        #[allow(clippy::absurd_extreme_comparisons)]
29437        #[allow(unused_comparisons)]
29438        if __tmp.remaining() < Self::ENCODED_LEN {
29439            panic!(
29440                "buffer is too small (need {} bytes, but got {})",
29441                Self::ENCODED_LEN,
29442                __tmp.remaining(),
29443            )
29444        }
29445        __tmp.put_i32_le(self.lat);
29446        __tmp.put_i32_le(self.lon);
29447        __tmp.put_u16_le(self.grid_spacing);
29448        for val in &self.data {
29449            __tmp.put_i16_le(*val);
29450        }
29451        __tmp.put_u8(self.gridbit);
29452        if matches!(version, MavlinkVersion::V2) {
29453            let len = __tmp.len();
29454            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29455        } else {
29456            __tmp.len()
29457        }
29458    }
29459}
29460#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29461#[doc = ""]
29462#[doc = "ID: 136"]
29463#[derive(Debug, Clone, PartialEq)]
29464#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29465#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29466#[cfg_attr(feature = "ts", derive(TS))]
29467#[cfg_attr(feature = "ts", ts(export))]
29468pub struct TERRAIN_REPORT_DATA {
29469    #[doc = "Latitude"]
29470    pub lat: i32,
29471    #[doc = "Longitude"]
29472    pub lon: i32,
29473    #[doc = "Terrain height MSL"]
29474    pub terrain_height: f32,
29475    #[doc = "Current vehicle height above lat/lon terrain height"]
29476    pub current_height: f32,
29477    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29478    pub spacing: u16,
29479    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29480    pub pending: u16,
29481    #[doc = "Number of 4x4 terrain blocks in memory"]
29482    pub loaded: u16,
29483}
29484impl TERRAIN_REPORT_DATA {
29485    pub const ENCODED_LEN: usize = 22usize;
29486    pub const DEFAULT: Self = Self {
29487        lat: 0_i32,
29488        lon: 0_i32,
29489        terrain_height: 0.0_f32,
29490        current_height: 0.0_f32,
29491        spacing: 0_u16,
29492        pending: 0_u16,
29493        loaded: 0_u16,
29494    };
29495    #[cfg(feature = "arbitrary")]
29496    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29497        use arbitrary::{Arbitrary, Unstructured};
29498        let mut buf = [0u8; 1024];
29499        rng.fill_bytes(&mut buf);
29500        let mut unstructured = Unstructured::new(&buf);
29501        Self::arbitrary(&mut unstructured).unwrap_or_default()
29502    }
29503}
29504impl Default for TERRAIN_REPORT_DATA {
29505    fn default() -> Self {
29506        Self::DEFAULT.clone()
29507    }
29508}
29509impl MessageData for TERRAIN_REPORT_DATA {
29510    type Message = MavMessage;
29511    const ID: u32 = 136u32;
29512    const NAME: &'static str = "TERRAIN_REPORT";
29513    const EXTRA_CRC: u8 = 1u8;
29514    const ENCODED_LEN: usize = 22usize;
29515    fn deser(
29516        _version: MavlinkVersion,
29517        __input: &[u8],
29518    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29519        let avail_len = __input.len();
29520        let mut payload_buf = [0; Self::ENCODED_LEN];
29521        let mut buf = if avail_len < Self::ENCODED_LEN {
29522            payload_buf[0..avail_len].copy_from_slice(__input);
29523            Bytes::new(&payload_buf)
29524        } else {
29525            Bytes::new(__input)
29526        };
29527        let mut __struct = Self::default();
29528        __struct.lat = buf.get_i32_le()?;
29529        __struct.lon = buf.get_i32_le()?;
29530        __struct.terrain_height = buf.get_f32_le()?;
29531        __struct.current_height = buf.get_f32_le()?;
29532        __struct.spacing = buf.get_u16_le()?;
29533        __struct.pending = buf.get_u16_le()?;
29534        __struct.loaded = buf.get_u16_le()?;
29535        Ok(__struct)
29536    }
29537    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29538        let mut __tmp = BytesMut::new(bytes);
29539        #[allow(clippy::absurd_extreme_comparisons)]
29540        #[allow(unused_comparisons)]
29541        if __tmp.remaining() < Self::ENCODED_LEN {
29542            panic!(
29543                "buffer is too small (need {} bytes, but got {})",
29544                Self::ENCODED_LEN,
29545                __tmp.remaining(),
29546            )
29547        }
29548        __tmp.put_i32_le(self.lat);
29549        __tmp.put_i32_le(self.lon);
29550        __tmp.put_f32_le(self.terrain_height);
29551        __tmp.put_f32_le(self.current_height);
29552        __tmp.put_u16_le(self.spacing);
29553        __tmp.put_u16_le(self.pending);
29554        __tmp.put_u16_le(self.loaded);
29555        if matches!(version, MavlinkVersion::V2) {
29556            let len = __tmp.len();
29557            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29558        } else {
29559            __tmp.len()
29560        }
29561    }
29562}
29563#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29564#[doc = ""]
29565#[doc = "ID: 133"]
29566#[derive(Debug, Clone, PartialEq)]
29567#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29568#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29569#[cfg_attr(feature = "ts", derive(TS))]
29570#[cfg_attr(feature = "ts", ts(export))]
29571pub struct TERRAIN_REQUEST_DATA {
29572    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
29573    pub mask: u64,
29574    #[doc = "Latitude of SW corner of first grid"]
29575    pub lat: i32,
29576    #[doc = "Longitude of SW corner of first grid"]
29577    pub lon: i32,
29578    #[doc = "Grid spacing"]
29579    pub grid_spacing: u16,
29580}
29581impl TERRAIN_REQUEST_DATA {
29582    pub const ENCODED_LEN: usize = 18usize;
29583    pub const DEFAULT: Self = Self {
29584        mask: 0_u64,
29585        lat: 0_i32,
29586        lon: 0_i32,
29587        grid_spacing: 0_u16,
29588    };
29589    #[cfg(feature = "arbitrary")]
29590    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29591        use arbitrary::{Arbitrary, Unstructured};
29592        let mut buf = [0u8; 1024];
29593        rng.fill_bytes(&mut buf);
29594        let mut unstructured = Unstructured::new(&buf);
29595        Self::arbitrary(&mut unstructured).unwrap_or_default()
29596    }
29597}
29598impl Default for TERRAIN_REQUEST_DATA {
29599    fn default() -> Self {
29600        Self::DEFAULT.clone()
29601    }
29602}
29603impl MessageData for TERRAIN_REQUEST_DATA {
29604    type Message = MavMessage;
29605    const ID: u32 = 133u32;
29606    const NAME: &'static str = "TERRAIN_REQUEST";
29607    const EXTRA_CRC: u8 = 6u8;
29608    const ENCODED_LEN: usize = 18usize;
29609    fn deser(
29610        _version: MavlinkVersion,
29611        __input: &[u8],
29612    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29613        let avail_len = __input.len();
29614        let mut payload_buf = [0; Self::ENCODED_LEN];
29615        let mut buf = if avail_len < Self::ENCODED_LEN {
29616            payload_buf[0..avail_len].copy_from_slice(__input);
29617            Bytes::new(&payload_buf)
29618        } else {
29619            Bytes::new(__input)
29620        };
29621        let mut __struct = Self::default();
29622        __struct.mask = buf.get_u64_le()?;
29623        __struct.lat = buf.get_i32_le()?;
29624        __struct.lon = buf.get_i32_le()?;
29625        __struct.grid_spacing = buf.get_u16_le()?;
29626        Ok(__struct)
29627    }
29628    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29629        let mut __tmp = BytesMut::new(bytes);
29630        #[allow(clippy::absurd_extreme_comparisons)]
29631        #[allow(unused_comparisons)]
29632        if __tmp.remaining() < Self::ENCODED_LEN {
29633            panic!(
29634                "buffer is too small (need {} bytes, but got {})",
29635                Self::ENCODED_LEN,
29636                __tmp.remaining(),
29637            )
29638        }
29639        __tmp.put_u64_le(self.mask);
29640        __tmp.put_i32_le(self.lat);
29641        __tmp.put_i32_le(self.lon);
29642        __tmp.put_u16_le(self.grid_spacing);
29643        if matches!(version, MavlinkVersion::V2) {
29644            let len = __tmp.len();
29645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29646        } else {
29647            __tmp.len()
29648        }
29649    }
29650}
29651#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
29652#[doc = ""]
29653#[doc = "ID: 111"]
29654#[derive(Debug, Clone, PartialEq)]
29655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29657#[cfg_attr(feature = "ts", derive(TS))]
29658#[cfg_attr(feature = "ts", ts(export))]
29659pub struct TIMESYNC_DATA {
29660    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
29661    pub tc1: i64,
29662    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
29663    pub ts1: i64,
29664    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
29665    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29666    pub target_system: u8,
29667    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
29668    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29669    pub target_component: u8,
29670}
29671impl TIMESYNC_DATA {
29672    pub const ENCODED_LEN: usize = 18usize;
29673    pub const DEFAULT: Self = Self {
29674        tc1: 0_i64,
29675        ts1: 0_i64,
29676        target_system: 0_u8,
29677        target_component: 0_u8,
29678    };
29679    #[cfg(feature = "arbitrary")]
29680    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29681        use arbitrary::{Arbitrary, Unstructured};
29682        let mut buf = [0u8; 1024];
29683        rng.fill_bytes(&mut buf);
29684        let mut unstructured = Unstructured::new(&buf);
29685        Self::arbitrary(&mut unstructured).unwrap_or_default()
29686    }
29687}
29688impl Default for TIMESYNC_DATA {
29689    fn default() -> Self {
29690        Self::DEFAULT.clone()
29691    }
29692}
29693impl MessageData for TIMESYNC_DATA {
29694    type Message = MavMessage;
29695    const ID: u32 = 111u32;
29696    const NAME: &'static str = "TIMESYNC";
29697    const EXTRA_CRC: u8 = 34u8;
29698    const ENCODED_LEN: usize = 18usize;
29699    fn deser(
29700        _version: MavlinkVersion,
29701        __input: &[u8],
29702    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29703        let avail_len = __input.len();
29704        let mut payload_buf = [0; Self::ENCODED_LEN];
29705        let mut buf = if avail_len < Self::ENCODED_LEN {
29706            payload_buf[0..avail_len].copy_from_slice(__input);
29707            Bytes::new(&payload_buf)
29708        } else {
29709            Bytes::new(__input)
29710        };
29711        let mut __struct = Self::default();
29712        __struct.tc1 = buf.get_i64_le()?;
29713        __struct.ts1 = buf.get_i64_le()?;
29714        __struct.target_system = buf.get_u8()?;
29715        __struct.target_component = buf.get_u8()?;
29716        Ok(__struct)
29717    }
29718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29719        let mut __tmp = BytesMut::new(bytes);
29720        #[allow(clippy::absurd_extreme_comparisons)]
29721        #[allow(unused_comparisons)]
29722        if __tmp.remaining() < Self::ENCODED_LEN {
29723            panic!(
29724                "buffer is too small (need {} bytes, but got {})",
29725                Self::ENCODED_LEN,
29726                __tmp.remaining(),
29727            )
29728        }
29729        __tmp.put_i64_le(self.tc1);
29730        __tmp.put_i64_le(self.ts1);
29731        if matches!(version, MavlinkVersion::V2) {
29732            __tmp.put_u8(self.target_system);
29733            __tmp.put_u8(self.target_component);
29734            let len = __tmp.len();
29735            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29736        } else {
29737            __tmp.len()
29738        }
29739    }
29740}
29741#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
29742#[doc = ""]
29743#[doc = "ID: 380"]
29744#[derive(Debug, Clone, PartialEq)]
29745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29747#[cfg_attr(feature = "ts", derive(TS))]
29748#[cfg_attr(feature = "ts", ts(export))]
29749pub struct TIME_ESTIMATE_TO_TARGET_DATA {
29750    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
29751    pub safe_return: i32,
29752    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
29753    pub land: i32,
29754    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
29755    pub mission_next_item: i32,
29756    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
29757    pub mission_end: i32,
29758    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
29759    pub commanded_action: i32,
29760}
29761impl TIME_ESTIMATE_TO_TARGET_DATA {
29762    pub const ENCODED_LEN: usize = 20usize;
29763    pub const DEFAULT: Self = Self {
29764        safe_return: 0_i32,
29765        land: 0_i32,
29766        mission_next_item: 0_i32,
29767        mission_end: 0_i32,
29768        commanded_action: 0_i32,
29769    };
29770    #[cfg(feature = "arbitrary")]
29771    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29772        use arbitrary::{Arbitrary, Unstructured};
29773        let mut buf = [0u8; 1024];
29774        rng.fill_bytes(&mut buf);
29775        let mut unstructured = Unstructured::new(&buf);
29776        Self::arbitrary(&mut unstructured).unwrap_or_default()
29777    }
29778}
29779impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
29780    fn default() -> Self {
29781        Self::DEFAULT.clone()
29782    }
29783}
29784impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
29785    type Message = MavMessage;
29786    const ID: u32 = 380u32;
29787    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
29788    const EXTRA_CRC: u8 = 232u8;
29789    const ENCODED_LEN: usize = 20usize;
29790    fn deser(
29791        _version: MavlinkVersion,
29792        __input: &[u8],
29793    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29794        let avail_len = __input.len();
29795        let mut payload_buf = [0; Self::ENCODED_LEN];
29796        let mut buf = if avail_len < Self::ENCODED_LEN {
29797            payload_buf[0..avail_len].copy_from_slice(__input);
29798            Bytes::new(&payload_buf)
29799        } else {
29800            Bytes::new(__input)
29801        };
29802        let mut __struct = Self::default();
29803        __struct.safe_return = buf.get_i32_le()?;
29804        __struct.land = buf.get_i32_le()?;
29805        __struct.mission_next_item = buf.get_i32_le()?;
29806        __struct.mission_end = buf.get_i32_le()?;
29807        __struct.commanded_action = buf.get_i32_le()?;
29808        Ok(__struct)
29809    }
29810    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29811        let mut __tmp = BytesMut::new(bytes);
29812        #[allow(clippy::absurd_extreme_comparisons)]
29813        #[allow(unused_comparisons)]
29814        if __tmp.remaining() < Self::ENCODED_LEN {
29815            panic!(
29816                "buffer is too small (need {} bytes, but got {})",
29817                Self::ENCODED_LEN,
29818                __tmp.remaining(),
29819            )
29820        }
29821        __tmp.put_i32_le(self.safe_return);
29822        __tmp.put_i32_le(self.land);
29823        __tmp.put_i32_le(self.mission_next_item);
29824        __tmp.put_i32_le(self.mission_end);
29825        __tmp.put_i32_le(self.commanded_action);
29826        if matches!(version, MavlinkVersion::V2) {
29827            let len = __tmp.len();
29828            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29829        } else {
29830            __tmp.len()
29831        }
29832    }
29833}
29834#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
29835#[doc = ""]
29836#[doc = "ID: 333"]
29837#[derive(Debug, Clone, PartialEq)]
29838#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29839#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29840#[cfg_attr(feature = "ts", derive(TS))]
29841#[cfg_attr(feature = "ts", ts(export))]
29842pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29843    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29844    pub time_usec: u64,
29845    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
29846    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29847    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29848    pub pos_x: [f32; 5],
29849    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
29850    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29851    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29852    pub pos_y: [f32; 5],
29853    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
29854    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29855    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29856    pub pos_z: [f32; 5],
29857    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
29858    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29859    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29860    pub delta: [f32; 5],
29861    #[doc = "Yaw. Set to NaN for unchanged"]
29862    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29863    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29864    pub pos_yaw: [f32; 5],
29865    #[doc = "Number of valid control points (up-to 5 points are possible)"]
29866    pub valid_points: u8,
29867}
29868impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29869    pub const ENCODED_LEN: usize = 109usize;
29870    pub const DEFAULT: Self = Self {
29871        time_usec: 0_u64,
29872        pos_x: [0.0_f32; 5usize],
29873        pos_y: [0.0_f32; 5usize],
29874        pos_z: [0.0_f32; 5usize],
29875        delta: [0.0_f32; 5usize],
29876        pos_yaw: [0.0_f32; 5usize],
29877        valid_points: 0_u8,
29878    };
29879    #[cfg(feature = "arbitrary")]
29880    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29881        use arbitrary::{Arbitrary, Unstructured};
29882        let mut buf = [0u8; 1024];
29883        rng.fill_bytes(&mut buf);
29884        let mut unstructured = Unstructured::new(&buf);
29885        Self::arbitrary(&mut unstructured).unwrap_or_default()
29886    }
29887}
29888impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29889    fn default() -> Self {
29890        Self::DEFAULT.clone()
29891    }
29892}
29893impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29894    type Message = MavMessage;
29895    const ID: u32 = 333u32;
29896    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
29897    const EXTRA_CRC: u8 = 231u8;
29898    const ENCODED_LEN: usize = 109usize;
29899    fn deser(
29900        _version: MavlinkVersion,
29901        __input: &[u8],
29902    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29903        let avail_len = __input.len();
29904        let mut payload_buf = [0; Self::ENCODED_LEN];
29905        let mut buf = if avail_len < Self::ENCODED_LEN {
29906            payload_buf[0..avail_len].copy_from_slice(__input);
29907            Bytes::new(&payload_buf)
29908        } else {
29909            Bytes::new(__input)
29910        };
29911        let mut __struct = Self::default();
29912        __struct.time_usec = buf.get_u64_le()?;
29913        for v in &mut __struct.pos_x {
29914            let val = buf.get_f32_le()?;
29915            *v = val;
29916        }
29917        for v in &mut __struct.pos_y {
29918            let val = buf.get_f32_le()?;
29919            *v = val;
29920        }
29921        for v in &mut __struct.pos_z {
29922            let val = buf.get_f32_le()?;
29923            *v = val;
29924        }
29925        for v in &mut __struct.delta {
29926            let val = buf.get_f32_le()?;
29927            *v = val;
29928        }
29929        for v in &mut __struct.pos_yaw {
29930            let val = buf.get_f32_le()?;
29931            *v = val;
29932        }
29933        __struct.valid_points = buf.get_u8()?;
29934        Ok(__struct)
29935    }
29936    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29937        let mut __tmp = BytesMut::new(bytes);
29938        #[allow(clippy::absurd_extreme_comparisons)]
29939        #[allow(unused_comparisons)]
29940        if __tmp.remaining() < Self::ENCODED_LEN {
29941            panic!(
29942                "buffer is too small (need {} bytes, but got {})",
29943                Self::ENCODED_LEN,
29944                __tmp.remaining(),
29945            )
29946        }
29947        __tmp.put_u64_le(self.time_usec);
29948        for val in &self.pos_x {
29949            __tmp.put_f32_le(*val);
29950        }
29951        for val in &self.pos_y {
29952            __tmp.put_f32_le(*val);
29953        }
29954        for val in &self.pos_z {
29955            __tmp.put_f32_le(*val);
29956        }
29957        for val in &self.delta {
29958            __tmp.put_f32_le(*val);
29959        }
29960        for val in &self.pos_yaw {
29961            __tmp.put_f32_le(*val);
29962        }
29963        __tmp.put_u8(self.valid_points);
29964        if matches!(version, MavlinkVersion::V2) {
29965            let len = __tmp.len();
29966            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29967        } else {
29968            __tmp.len()
29969        }
29970    }
29971}
29972#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
29973#[doc = ""]
29974#[doc = "ID: 332"]
29975#[derive(Debug, Clone, PartialEq)]
29976#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29978#[cfg_attr(feature = "ts", derive(TS))]
29979#[cfg_attr(feature = "ts", ts(export))]
29980pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29981    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29982    pub time_usec: u64,
29983    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
29984    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29985    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29986    pub pos_x: [f32; 5],
29987    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
29988    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29989    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29990    pub pos_y: [f32; 5],
29991    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
29992    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29993    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29994    pub pos_z: [f32; 5],
29995    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
29996    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29997    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29998    pub vel_x: [f32; 5],
29999    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30000    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30001    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30002    pub vel_y: [f32; 5],
30003    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30004    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30005    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30006    pub vel_z: [f32; 5],
30007    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30008    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30009    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30010    pub acc_x: [f32; 5],
30011    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30012    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30013    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30014    pub acc_y: [f32; 5],
30015    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30016    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30017    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30018    pub acc_z: [f32; 5],
30019    #[doc = "Yaw angle, set to NaN if not being used"]
30020    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30021    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30022    pub pos_yaw: [f32; 5],
30023    #[doc = "Yaw rate, set to NaN if not being used"]
30024    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30025    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30026    pub vel_yaw: [f32; 5],
30027    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30028    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30029    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30030    pub command: [u16; 5],
30031    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30032    pub valid_points: u8,
30033}
30034impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30035    pub const ENCODED_LEN: usize = 239usize;
30036    pub const DEFAULT: Self = Self {
30037        time_usec: 0_u64,
30038        pos_x: [0.0_f32; 5usize],
30039        pos_y: [0.0_f32; 5usize],
30040        pos_z: [0.0_f32; 5usize],
30041        vel_x: [0.0_f32; 5usize],
30042        vel_y: [0.0_f32; 5usize],
30043        vel_z: [0.0_f32; 5usize],
30044        acc_x: [0.0_f32; 5usize],
30045        acc_y: [0.0_f32; 5usize],
30046        acc_z: [0.0_f32; 5usize],
30047        pos_yaw: [0.0_f32; 5usize],
30048        vel_yaw: [0.0_f32; 5usize],
30049        command: [0_u16; 5usize],
30050        valid_points: 0_u8,
30051    };
30052    #[cfg(feature = "arbitrary")]
30053    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30054        use arbitrary::{Arbitrary, Unstructured};
30055        let mut buf = [0u8; 1024];
30056        rng.fill_bytes(&mut buf);
30057        let mut unstructured = Unstructured::new(&buf);
30058        Self::arbitrary(&mut unstructured).unwrap_or_default()
30059    }
30060}
30061impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30062    fn default() -> Self {
30063        Self::DEFAULT.clone()
30064    }
30065}
30066impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30067    type Message = MavMessage;
30068    const ID: u32 = 332u32;
30069    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30070    const EXTRA_CRC: u8 = 236u8;
30071    const ENCODED_LEN: usize = 239usize;
30072    fn deser(
30073        _version: MavlinkVersion,
30074        __input: &[u8],
30075    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30076        let avail_len = __input.len();
30077        let mut payload_buf = [0; Self::ENCODED_LEN];
30078        let mut buf = if avail_len < Self::ENCODED_LEN {
30079            payload_buf[0..avail_len].copy_from_slice(__input);
30080            Bytes::new(&payload_buf)
30081        } else {
30082            Bytes::new(__input)
30083        };
30084        let mut __struct = Self::default();
30085        __struct.time_usec = buf.get_u64_le()?;
30086        for v in &mut __struct.pos_x {
30087            let val = buf.get_f32_le()?;
30088            *v = val;
30089        }
30090        for v in &mut __struct.pos_y {
30091            let val = buf.get_f32_le()?;
30092            *v = val;
30093        }
30094        for v in &mut __struct.pos_z {
30095            let val = buf.get_f32_le()?;
30096            *v = val;
30097        }
30098        for v in &mut __struct.vel_x {
30099            let val = buf.get_f32_le()?;
30100            *v = val;
30101        }
30102        for v in &mut __struct.vel_y {
30103            let val = buf.get_f32_le()?;
30104            *v = val;
30105        }
30106        for v in &mut __struct.vel_z {
30107            let val = buf.get_f32_le()?;
30108            *v = val;
30109        }
30110        for v in &mut __struct.acc_x {
30111            let val = buf.get_f32_le()?;
30112            *v = val;
30113        }
30114        for v in &mut __struct.acc_y {
30115            let val = buf.get_f32_le()?;
30116            *v = val;
30117        }
30118        for v in &mut __struct.acc_z {
30119            let val = buf.get_f32_le()?;
30120            *v = val;
30121        }
30122        for v in &mut __struct.pos_yaw {
30123            let val = buf.get_f32_le()?;
30124            *v = val;
30125        }
30126        for v in &mut __struct.vel_yaw {
30127            let val = buf.get_f32_le()?;
30128            *v = val;
30129        }
30130        for v in &mut __struct.command {
30131            let val = buf.get_u16_le()?;
30132            *v = val;
30133        }
30134        __struct.valid_points = buf.get_u8()?;
30135        Ok(__struct)
30136    }
30137    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30138        let mut __tmp = BytesMut::new(bytes);
30139        #[allow(clippy::absurd_extreme_comparisons)]
30140        #[allow(unused_comparisons)]
30141        if __tmp.remaining() < Self::ENCODED_LEN {
30142            panic!(
30143                "buffer is too small (need {} bytes, but got {})",
30144                Self::ENCODED_LEN,
30145                __tmp.remaining(),
30146            )
30147        }
30148        __tmp.put_u64_le(self.time_usec);
30149        for val in &self.pos_x {
30150            __tmp.put_f32_le(*val);
30151        }
30152        for val in &self.pos_y {
30153            __tmp.put_f32_le(*val);
30154        }
30155        for val in &self.pos_z {
30156            __tmp.put_f32_le(*val);
30157        }
30158        for val in &self.vel_x {
30159            __tmp.put_f32_le(*val);
30160        }
30161        for val in &self.vel_y {
30162            __tmp.put_f32_le(*val);
30163        }
30164        for val in &self.vel_z {
30165            __tmp.put_f32_le(*val);
30166        }
30167        for val in &self.acc_x {
30168            __tmp.put_f32_le(*val);
30169        }
30170        for val in &self.acc_y {
30171            __tmp.put_f32_le(*val);
30172        }
30173        for val in &self.acc_z {
30174            __tmp.put_f32_le(*val);
30175        }
30176        for val in &self.pos_yaw {
30177            __tmp.put_f32_le(*val);
30178        }
30179        for val in &self.vel_yaw {
30180            __tmp.put_f32_le(*val);
30181        }
30182        for val in &self.command {
30183            __tmp.put_u16_le(*val);
30184        }
30185        __tmp.put_u8(self.valid_points);
30186        if matches!(version, MavlinkVersion::V2) {
30187            let len = __tmp.len();
30188            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30189        } else {
30190            __tmp.len()
30191        }
30192    }
30193}
30194#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30195#[doc = ""]
30196#[doc = "ID: 385"]
30197#[derive(Debug, Clone, PartialEq)]
30198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30200#[cfg_attr(feature = "ts", derive(TS))]
30201#[cfg_attr(feature = "ts", ts(export))]
30202pub struct TUNNEL_DATA {
30203    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30204    pub payload_type: MavTunnelPayloadType,
30205    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30206    pub target_system: u8,
30207    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30208    pub target_component: u8,
30209    #[doc = "Length of the data transported in payload"]
30210    pub payload_length: u8,
30211    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30212    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30213    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30214    pub payload: [u8; 128],
30215}
30216impl TUNNEL_DATA {
30217    pub const ENCODED_LEN: usize = 133usize;
30218    pub const DEFAULT: Self = Self {
30219        payload_type: MavTunnelPayloadType::DEFAULT,
30220        target_system: 0_u8,
30221        target_component: 0_u8,
30222        payload_length: 0_u8,
30223        payload: [0_u8; 128usize],
30224    };
30225    #[cfg(feature = "arbitrary")]
30226    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30227        use arbitrary::{Arbitrary, Unstructured};
30228        let mut buf = [0u8; 1024];
30229        rng.fill_bytes(&mut buf);
30230        let mut unstructured = Unstructured::new(&buf);
30231        Self::arbitrary(&mut unstructured).unwrap_or_default()
30232    }
30233}
30234impl Default for TUNNEL_DATA {
30235    fn default() -> Self {
30236        Self::DEFAULT.clone()
30237    }
30238}
30239impl MessageData for TUNNEL_DATA {
30240    type Message = MavMessage;
30241    const ID: u32 = 385u32;
30242    const NAME: &'static str = "TUNNEL";
30243    const EXTRA_CRC: u8 = 147u8;
30244    const ENCODED_LEN: usize = 133usize;
30245    fn deser(
30246        _version: MavlinkVersion,
30247        __input: &[u8],
30248    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30249        let avail_len = __input.len();
30250        let mut payload_buf = [0; Self::ENCODED_LEN];
30251        let mut buf = if avail_len < Self::ENCODED_LEN {
30252            payload_buf[0..avail_len].copy_from_slice(__input);
30253            Bytes::new(&payload_buf)
30254        } else {
30255            Bytes::new(__input)
30256        };
30257        let mut __struct = Self::default();
30258        let tmp = buf.get_u16_le()?;
30259        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30260            ::mavlink_core::error::ParserError::InvalidEnum {
30261                enum_type: "MavTunnelPayloadType",
30262                value: tmp as u64,
30263            },
30264        )?;
30265        __struct.target_system = buf.get_u8()?;
30266        __struct.target_component = buf.get_u8()?;
30267        __struct.payload_length = buf.get_u8()?;
30268        for v in &mut __struct.payload {
30269            let val = buf.get_u8()?;
30270            *v = val;
30271        }
30272        Ok(__struct)
30273    }
30274    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30275        let mut __tmp = BytesMut::new(bytes);
30276        #[allow(clippy::absurd_extreme_comparisons)]
30277        #[allow(unused_comparisons)]
30278        if __tmp.remaining() < Self::ENCODED_LEN {
30279            panic!(
30280                "buffer is too small (need {} bytes, but got {})",
30281                Self::ENCODED_LEN,
30282                __tmp.remaining(),
30283            )
30284        }
30285        __tmp.put_u16_le(self.payload_type as u16);
30286        __tmp.put_u8(self.target_system);
30287        __tmp.put_u8(self.target_component);
30288        __tmp.put_u8(self.payload_length);
30289        for val in &self.payload {
30290            __tmp.put_u8(*val);
30291        }
30292        if matches!(version, MavlinkVersion::V2) {
30293            let len = __tmp.len();
30294            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30295        } else {
30296            __tmp.len()
30297        }
30298    }
30299}
30300#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30301#[doc = ""]
30302#[doc = "ID: 311"]
30303#[derive(Debug, Clone, PartialEq)]
30304#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30306#[cfg_attr(feature = "ts", derive(TS))]
30307#[cfg_attr(feature = "ts", ts(export))]
30308pub struct UAVCAN_NODE_INFO_DATA {
30309    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30310    pub time_usec: u64,
30311    #[doc = "Time since the start-up of the node."]
30312    pub uptime_sec: u32,
30313    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30314    pub sw_vcs_commit: u32,
30315    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30316    #[cfg_attr(feature = "ts", ts(type = "string"))]
30317    pub name: CharArray<80>,
30318    #[doc = "Hardware major version number."]
30319    pub hw_version_major: u8,
30320    #[doc = "Hardware minor version number."]
30321    pub hw_version_minor: u8,
30322    #[doc = "Hardware unique 128-bit ID."]
30323    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30324    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30325    pub hw_unique_id: [u8; 16],
30326    #[doc = "Software major version number."]
30327    pub sw_version_major: u8,
30328    #[doc = "Software minor version number."]
30329    pub sw_version_minor: u8,
30330}
30331impl UAVCAN_NODE_INFO_DATA {
30332    pub const ENCODED_LEN: usize = 116usize;
30333    pub const DEFAULT: Self = Self {
30334        time_usec: 0_u64,
30335        uptime_sec: 0_u32,
30336        sw_vcs_commit: 0_u32,
30337        name: CharArray::new([0_u8; 80usize]),
30338        hw_version_major: 0_u8,
30339        hw_version_minor: 0_u8,
30340        hw_unique_id: [0_u8; 16usize],
30341        sw_version_major: 0_u8,
30342        sw_version_minor: 0_u8,
30343    };
30344    #[cfg(feature = "arbitrary")]
30345    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30346        use arbitrary::{Arbitrary, Unstructured};
30347        let mut buf = [0u8; 1024];
30348        rng.fill_bytes(&mut buf);
30349        let mut unstructured = Unstructured::new(&buf);
30350        Self::arbitrary(&mut unstructured).unwrap_or_default()
30351    }
30352}
30353impl Default for UAVCAN_NODE_INFO_DATA {
30354    fn default() -> Self {
30355        Self::DEFAULT.clone()
30356    }
30357}
30358impl MessageData for UAVCAN_NODE_INFO_DATA {
30359    type Message = MavMessage;
30360    const ID: u32 = 311u32;
30361    const NAME: &'static str = "UAVCAN_NODE_INFO";
30362    const EXTRA_CRC: u8 = 95u8;
30363    const ENCODED_LEN: usize = 116usize;
30364    fn deser(
30365        _version: MavlinkVersion,
30366        __input: &[u8],
30367    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30368        let avail_len = __input.len();
30369        let mut payload_buf = [0; Self::ENCODED_LEN];
30370        let mut buf = if avail_len < Self::ENCODED_LEN {
30371            payload_buf[0..avail_len].copy_from_slice(__input);
30372            Bytes::new(&payload_buf)
30373        } else {
30374            Bytes::new(__input)
30375        };
30376        let mut __struct = Self::default();
30377        __struct.time_usec = buf.get_u64_le()?;
30378        __struct.uptime_sec = buf.get_u32_le()?;
30379        __struct.sw_vcs_commit = buf.get_u32_le()?;
30380        let mut tmp = [0_u8; 80usize];
30381        for v in &mut tmp {
30382            *v = buf.get_u8()?;
30383        }
30384        __struct.name = CharArray::new(tmp);
30385        __struct.hw_version_major = buf.get_u8()?;
30386        __struct.hw_version_minor = buf.get_u8()?;
30387        for v in &mut __struct.hw_unique_id {
30388            let val = buf.get_u8()?;
30389            *v = val;
30390        }
30391        __struct.sw_version_major = buf.get_u8()?;
30392        __struct.sw_version_minor = buf.get_u8()?;
30393        Ok(__struct)
30394    }
30395    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30396        let mut __tmp = BytesMut::new(bytes);
30397        #[allow(clippy::absurd_extreme_comparisons)]
30398        #[allow(unused_comparisons)]
30399        if __tmp.remaining() < Self::ENCODED_LEN {
30400            panic!(
30401                "buffer is too small (need {} bytes, but got {})",
30402                Self::ENCODED_LEN,
30403                __tmp.remaining(),
30404            )
30405        }
30406        __tmp.put_u64_le(self.time_usec);
30407        __tmp.put_u32_le(self.uptime_sec);
30408        __tmp.put_u32_le(self.sw_vcs_commit);
30409        for val in &self.name {
30410            __tmp.put_u8(*val);
30411        }
30412        __tmp.put_u8(self.hw_version_major);
30413        __tmp.put_u8(self.hw_version_minor);
30414        for val in &self.hw_unique_id {
30415            __tmp.put_u8(*val);
30416        }
30417        __tmp.put_u8(self.sw_version_major);
30418        __tmp.put_u8(self.sw_version_minor);
30419        if matches!(version, MavlinkVersion::V2) {
30420            let len = __tmp.len();
30421            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30422        } else {
30423            __tmp.len()
30424        }
30425    }
30426}
30427#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30428#[doc = ""]
30429#[doc = "ID: 310"]
30430#[derive(Debug, Clone, PartialEq)]
30431#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30433#[cfg_attr(feature = "ts", derive(TS))]
30434#[cfg_attr(feature = "ts", ts(export))]
30435pub struct UAVCAN_NODE_STATUS_DATA {
30436    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30437    pub time_usec: u64,
30438    #[doc = "Time since the start-up of the node."]
30439    pub uptime_sec: u32,
30440    #[doc = "Vendor-specific status information."]
30441    pub vendor_specific_status_code: u16,
30442    #[doc = "Generalized node health status."]
30443    pub health: UavcanNodeHealth,
30444    #[doc = "Generalized operating mode."]
30445    pub mode: UavcanNodeMode,
30446    #[doc = "Not used currently."]
30447    pub sub_mode: u8,
30448}
30449impl UAVCAN_NODE_STATUS_DATA {
30450    pub const ENCODED_LEN: usize = 17usize;
30451    pub const DEFAULT: Self = Self {
30452        time_usec: 0_u64,
30453        uptime_sec: 0_u32,
30454        vendor_specific_status_code: 0_u16,
30455        health: UavcanNodeHealth::DEFAULT,
30456        mode: UavcanNodeMode::DEFAULT,
30457        sub_mode: 0_u8,
30458    };
30459    #[cfg(feature = "arbitrary")]
30460    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30461        use arbitrary::{Arbitrary, Unstructured};
30462        let mut buf = [0u8; 1024];
30463        rng.fill_bytes(&mut buf);
30464        let mut unstructured = Unstructured::new(&buf);
30465        Self::arbitrary(&mut unstructured).unwrap_or_default()
30466    }
30467}
30468impl Default for UAVCAN_NODE_STATUS_DATA {
30469    fn default() -> Self {
30470        Self::DEFAULT.clone()
30471    }
30472}
30473impl MessageData for UAVCAN_NODE_STATUS_DATA {
30474    type Message = MavMessage;
30475    const ID: u32 = 310u32;
30476    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30477    const EXTRA_CRC: u8 = 28u8;
30478    const ENCODED_LEN: usize = 17usize;
30479    fn deser(
30480        _version: MavlinkVersion,
30481        __input: &[u8],
30482    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30483        let avail_len = __input.len();
30484        let mut payload_buf = [0; Self::ENCODED_LEN];
30485        let mut buf = if avail_len < Self::ENCODED_LEN {
30486            payload_buf[0..avail_len].copy_from_slice(__input);
30487            Bytes::new(&payload_buf)
30488        } else {
30489            Bytes::new(__input)
30490        };
30491        let mut __struct = Self::default();
30492        __struct.time_usec = buf.get_u64_le()?;
30493        __struct.uptime_sec = buf.get_u32_le()?;
30494        __struct.vendor_specific_status_code = buf.get_u16_le()?;
30495        let tmp = buf.get_u8()?;
30496        __struct.health =
30497            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30498                enum_type: "UavcanNodeHealth",
30499                value: tmp as u64,
30500            })?;
30501        let tmp = buf.get_u8()?;
30502        __struct.mode =
30503            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30504                enum_type: "UavcanNodeMode",
30505                value: tmp as u64,
30506            })?;
30507        __struct.sub_mode = buf.get_u8()?;
30508        Ok(__struct)
30509    }
30510    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30511        let mut __tmp = BytesMut::new(bytes);
30512        #[allow(clippy::absurd_extreme_comparisons)]
30513        #[allow(unused_comparisons)]
30514        if __tmp.remaining() < Self::ENCODED_LEN {
30515            panic!(
30516                "buffer is too small (need {} bytes, but got {})",
30517                Self::ENCODED_LEN,
30518                __tmp.remaining(),
30519            )
30520        }
30521        __tmp.put_u64_le(self.time_usec);
30522        __tmp.put_u32_le(self.uptime_sec);
30523        __tmp.put_u16_le(self.vendor_specific_status_code);
30524        __tmp.put_u8(self.health as u8);
30525        __tmp.put_u8(self.mode as u8);
30526        __tmp.put_u8(self.sub_mode);
30527        if matches!(version, MavlinkVersion::V2) {
30528            let len = __tmp.len();
30529            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30530        } else {
30531            __tmp.len()
30532        }
30533    }
30534}
30535#[doc = "The global position resulting from GPS and sensor fusion."]
30536#[doc = ""]
30537#[doc = "ID: 340"]
30538#[derive(Debug, Clone, PartialEq)]
30539#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30540#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30541#[cfg_attr(feature = "ts", derive(TS))]
30542#[cfg_attr(feature = "ts", ts(export))]
30543pub struct UTM_GLOBAL_POSITION_DATA {
30544    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
30545    pub time: u64,
30546    #[doc = "Latitude (WGS84)"]
30547    pub lat: i32,
30548    #[doc = "Longitude (WGS84)"]
30549    pub lon: i32,
30550    #[doc = "Altitude (WGS84)"]
30551    pub alt: i32,
30552    #[doc = "Altitude above ground"]
30553    pub relative_alt: i32,
30554    #[doc = "Next waypoint, latitude (WGS84)"]
30555    pub next_lat: i32,
30556    #[doc = "Next waypoint, longitude (WGS84)"]
30557    pub next_lon: i32,
30558    #[doc = "Next waypoint, altitude (WGS84)"]
30559    pub next_alt: i32,
30560    #[doc = "Ground X speed (latitude, positive north)"]
30561    pub vx: i16,
30562    #[doc = "Ground Y speed (longitude, positive east)"]
30563    pub vy: i16,
30564    #[doc = "Ground Z speed (altitude, positive down)"]
30565    pub vz: i16,
30566    #[doc = "Horizontal position uncertainty (standard deviation)"]
30567    pub h_acc: u16,
30568    #[doc = "Altitude uncertainty (standard deviation)"]
30569    pub v_acc: u16,
30570    #[doc = "Speed uncertainty (standard deviation)"]
30571    pub vel_acc: u16,
30572    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
30573    pub update_rate: u16,
30574    #[doc = "Unique UAS ID."]
30575    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30576    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30577    pub uas_id: [u8; 18],
30578    #[doc = "Flight state"]
30579    pub flight_state: UtmFlightState,
30580    #[doc = "Bitwise OR combination of the data available flags."]
30581    pub flags: UtmDataAvailFlags,
30582}
30583impl UTM_GLOBAL_POSITION_DATA {
30584    pub const ENCODED_LEN: usize = 70usize;
30585    pub const DEFAULT: Self = Self {
30586        time: 0_u64,
30587        lat: 0_i32,
30588        lon: 0_i32,
30589        alt: 0_i32,
30590        relative_alt: 0_i32,
30591        next_lat: 0_i32,
30592        next_lon: 0_i32,
30593        next_alt: 0_i32,
30594        vx: 0_i16,
30595        vy: 0_i16,
30596        vz: 0_i16,
30597        h_acc: 0_u16,
30598        v_acc: 0_u16,
30599        vel_acc: 0_u16,
30600        update_rate: 0_u16,
30601        uas_id: [0_u8; 18usize],
30602        flight_state: UtmFlightState::DEFAULT,
30603        flags: UtmDataAvailFlags::DEFAULT,
30604    };
30605    #[cfg(feature = "arbitrary")]
30606    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30607        use arbitrary::{Arbitrary, Unstructured};
30608        let mut buf = [0u8; 1024];
30609        rng.fill_bytes(&mut buf);
30610        let mut unstructured = Unstructured::new(&buf);
30611        Self::arbitrary(&mut unstructured).unwrap_or_default()
30612    }
30613}
30614impl Default for UTM_GLOBAL_POSITION_DATA {
30615    fn default() -> Self {
30616        Self::DEFAULT.clone()
30617    }
30618}
30619impl MessageData for UTM_GLOBAL_POSITION_DATA {
30620    type Message = MavMessage;
30621    const ID: u32 = 340u32;
30622    const NAME: &'static str = "UTM_GLOBAL_POSITION";
30623    const EXTRA_CRC: u8 = 99u8;
30624    const ENCODED_LEN: usize = 70usize;
30625    fn deser(
30626        _version: MavlinkVersion,
30627        __input: &[u8],
30628    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30629        let avail_len = __input.len();
30630        let mut payload_buf = [0; Self::ENCODED_LEN];
30631        let mut buf = if avail_len < Self::ENCODED_LEN {
30632            payload_buf[0..avail_len].copy_from_slice(__input);
30633            Bytes::new(&payload_buf)
30634        } else {
30635            Bytes::new(__input)
30636        };
30637        let mut __struct = Self::default();
30638        __struct.time = buf.get_u64_le()?;
30639        __struct.lat = buf.get_i32_le()?;
30640        __struct.lon = buf.get_i32_le()?;
30641        __struct.alt = buf.get_i32_le()?;
30642        __struct.relative_alt = buf.get_i32_le()?;
30643        __struct.next_lat = buf.get_i32_le()?;
30644        __struct.next_lon = buf.get_i32_le()?;
30645        __struct.next_alt = buf.get_i32_le()?;
30646        __struct.vx = buf.get_i16_le()?;
30647        __struct.vy = buf.get_i16_le()?;
30648        __struct.vz = buf.get_i16_le()?;
30649        __struct.h_acc = buf.get_u16_le()?;
30650        __struct.v_acc = buf.get_u16_le()?;
30651        __struct.vel_acc = buf.get_u16_le()?;
30652        __struct.update_rate = buf.get_u16_le()?;
30653        for v in &mut __struct.uas_id {
30654            let val = buf.get_u8()?;
30655            *v = val;
30656        }
30657        let tmp = buf.get_u8()?;
30658        __struct.flight_state =
30659            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30660                enum_type: "UtmFlightState",
30661                value: tmp as u64,
30662            })?;
30663        let tmp = buf.get_u8()?;
30664        __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
30665            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30666                flag_type: "UtmDataAvailFlags",
30667                value: tmp as u64,
30668            })?;
30669        Ok(__struct)
30670    }
30671    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30672        let mut __tmp = BytesMut::new(bytes);
30673        #[allow(clippy::absurd_extreme_comparisons)]
30674        #[allow(unused_comparisons)]
30675        if __tmp.remaining() < Self::ENCODED_LEN {
30676            panic!(
30677                "buffer is too small (need {} bytes, but got {})",
30678                Self::ENCODED_LEN,
30679                __tmp.remaining(),
30680            )
30681        }
30682        __tmp.put_u64_le(self.time);
30683        __tmp.put_i32_le(self.lat);
30684        __tmp.put_i32_le(self.lon);
30685        __tmp.put_i32_le(self.alt);
30686        __tmp.put_i32_le(self.relative_alt);
30687        __tmp.put_i32_le(self.next_lat);
30688        __tmp.put_i32_le(self.next_lon);
30689        __tmp.put_i32_le(self.next_alt);
30690        __tmp.put_i16_le(self.vx);
30691        __tmp.put_i16_le(self.vy);
30692        __tmp.put_i16_le(self.vz);
30693        __tmp.put_u16_le(self.h_acc);
30694        __tmp.put_u16_le(self.v_acc);
30695        __tmp.put_u16_le(self.vel_acc);
30696        __tmp.put_u16_le(self.update_rate);
30697        for val in &self.uas_id {
30698            __tmp.put_u8(*val);
30699        }
30700        __tmp.put_u8(self.flight_state as u8);
30701        __tmp.put_u8(self.flags.bits() as u8);
30702        if matches!(version, MavlinkVersion::V2) {
30703            let len = __tmp.len();
30704            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30705        } else {
30706            __tmp.len()
30707        }
30708    }
30709}
30710#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
30711#[doc = ""]
30712#[doc = "ID: 248"]
30713#[derive(Debug, Clone, PartialEq)]
30714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30716#[cfg_attr(feature = "ts", derive(TS))]
30717#[cfg_attr(feature = "ts", ts(export))]
30718pub struct V2_EXTENSION_DATA {
30719    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30720    pub message_type: u16,
30721    #[doc = "Network ID (0 for broadcast)"]
30722    pub target_network: u8,
30723    #[doc = "System ID (0 for broadcast)"]
30724    pub target_system: u8,
30725    #[doc = "Component ID (0 for broadcast)"]
30726    pub target_component: u8,
30727    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
30728    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30729    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30730    pub payload: [u8; 249],
30731}
30732impl V2_EXTENSION_DATA {
30733    pub const ENCODED_LEN: usize = 254usize;
30734    pub const DEFAULT: Self = Self {
30735        message_type: 0_u16,
30736        target_network: 0_u8,
30737        target_system: 0_u8,
30738        target_component: 0_u8,
30739        payload: [0_u8; 249usize],
30740    };
30741    #[cfg(feature = "arbitrary")]
30742    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30743        use arbitrary::{Arbitrary, Unstructured};
30744        let mut buf = [0u8; 1024];
30745        rng.fill_bytes(&mut buf);
30746        let mut unstructured = Unstructured::new(&buf);
30747        Self::arbitrary(&mut unstructured).unwrap_or_default()
30748    }
30749}
30750impl Default for V2_EXTENSION_DATA {
30751    fn default() -> Self {
30752        Self::DEFAULT.clone()
30753    }
30754}
30755impl MessageData for V2_EXTENSION_DATA {
30756    type Message = MavMessage;
30757    const ID: u32 = 248u32;
30758    const NAME: &'static str = "V2_EXTENSION";
30759    const EXTRA_CRC: u8 = 8u8;
30760    const ENCODED_LEN: usize = 254usize;
30761    fn deser(
30762        _version: MavlinkVersion,
30763        __input: &[u8],
30764    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30765        let avail_len = __input.len();
30766        let mut payload_buf = [0; Self::ENCODED_LEN];
30767        let mut buf = if avail_len < Self::ENCODED_LEN {
30768            payload_buf[0..avail_len].copy_from_slice(__input);
30769            Bytes::new(&payload_buf)
30770        } else {
30771            Bytes::new(__input)
30772        };
30773        let mut __struct = Self::default();
30774        __struct.message_type = buf.get_u16_le()?;
30775        __struct.target_network = buf.get_u8()?;
30776        __struct.target_system = buf.get_u8()?;
30777        __struct.target_component = buf.get_u8()?;
30778        for v in &mut __struct.payload {
30779            let val = buf.get_u8()?;
30780            *v = val;
30781        }
30782        Ok(__struct)
30783    }
30784    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30785        let mut __tmp = BytesMut::new(bytes);
30786        #[allow(clippy::absurd_extreme_comparisons)]
30787        #[allow(unused_comparisons)]
30788        if __tmp.remaining() < Self::ENCODED_LEN {
30789            panic!(
30790                "buffer is too small (need {} bytes, but got {})",
30791                Self::ENCODED_LEN,
30792                __tmp.remaining(),
30793            )
30794        }
30795        __tmp.put_u16_le(self.message_type);
30796        __tmp.put_u8(self.target_network);
30797        __tmp.put_u8(self.target_system);
30798        __tmp.put_u8(self.target_component);
30799        for val in &self.payload {
30800            __tmp.put_u8(*val);
30801        }
30802        if matches!(version, MavlinkVersion::V2) {
30803            let len = __tmp.len();
30804            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30805        } else {
30806            __tmp.len()
30807        }
30808    }
30809}
30810#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
30811#[doc = ""]
30812#[doc = "ID: 74"]
30813#[derive(Debug, Clone, PartialEq)]
30814#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30816#[cfg_attr(feature = "ts", derive(TS))]
30817#[cfg_attr(feature = "ts", ts(export))]
30818pub struct VFR_HUD_DATA {
30819    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
30820    pub airspeed: f32,
30821    #[doc = "Current ground speed."]
30822    pub groundspeed: f32,
30823    #[doc = "Current altitude (MSL)."]
30824    pub alt: f32,
30825    #[doc = "Current climb rate."]
30826    pub climb: f32,
30827    #[doc = "Current heading in compass units (0-360, 0=north)."]
30828    pub heading: i16,
30829    #[doc = "Current throttle setting (0 to 100)."]
30830    pub throttle: u16,
30831}
30832impl VFR_HUD_DATA {
30833    pub const ENCODED_LEN: usize = 20usize;
30834    pub const DEFAULT: Self = Self {
30835        airspeed: 0.0_f32,
30836        groundspeed: 0.0_f32,
30837        alt: 0.0_f32,
30838        climb: 0.0_f32,
30839        heading: 0_i16,
30840        throttle: 0_u16,
30841    };
30842    #[cfg(feature = "arbitrary")]
30843    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30844        use arbitrary::{Arbitrary, Unstructured};
30845        let mut buf = [0u8; 1024];
30846        rng.fill_bytes(&mut buf);
30847        let mut unstructured = Unstructured::new(&buf);
30848        Self::arbitrary(&mut unstructured).unwrap_or_default()
30849    }
30850}
30851impl Default for VFR_HUD_DATA {
30852    fn default() -> Self {
30853        Self::DEFAULT.clone()
30854    }
30855}
30856impl MessageData for VFR_HUD_DATA {
30857    type Message = MavMessage;
30858    const ID: u32 = 74u32;
30859    const NAME: &'static str = "VFR_HUD";
30860    const EXTRA_CRC: u8 = 20u8;
30861    const ENCODED_LEN: usize = 20usize;
30862    fn deser(
30863        _version: MavlinkVersion,
30864        __input: &[u8],
30865    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30866        let avail_len = __input.len();
30867        let mut payload_buf = [0; Self::ENCODED_LEN];
30868        let mut buf = if avail_len < Self::ENCODED_LEN {
30869            payload_buf[0..avail_len].copy_from_slice(__input);
30870            Bytes::new(&payload_buf)
30871        } else {
30872            Bytes::new(__input)
30873        };
30874        let mut __struct = Self::default();
30875        __struct.airspeed = buf.get_f32_le()?;
30876        __struct.groundspeed = buf.get_f32_le()?;
30877        __struct.alt = buf.get_f32_le()?;
30878        __struct.climb = buf.get_f32_le()?;
30879        __struct.heading = buf.get_i16_le()?;
30880        __struct.throttle = buf.get_u16_le()?;
30881        Ok(__struct)
30882    }
30883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30884        let mut __tmp = BytesMut::new(bytes);
30885        #[allow(clippy::absurd_extreme_comparisons)]
30886        #[allow(unused_comparisons)]
30887        if __tmp.remaining() < Self::ENCODED_LEN {
30888            panic!(
30889                "buffer is too small (need {} bytes, but got {})",
30890                Self::ENCODED_LEN,
30891                __tmp.remaining(),
30892            )
30893        }
30894        __tmp.put_f32_le(self.airspeed);
30895        __tmp.put_f32_le(self.groundspeed);
30896        __tmp.put_f32_le(self.alt);
30897        __tmp.put_f32_le(self.climb);
30898        __tmp.put_i16_le(self.heading);
30899        __tmp.put_u16_le(self.throttle);
30900        if matches!(version, MavlinkVersion::V2) {
30901            let len = __tmp.len();
30902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30903        } else {
30904            __tmp.len()
30905        }
30906    }
30907}
30908#[doc = "Vibration levels and accelerometer clipping."]
30909#[doc = ""]
30910#[doc = "ID: 241"]
30911#[derive(Debug, Clone, PartialEq)]
30912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30914#[cfg_attr(feature = "ts", derive(TS))]
30915#[cfg_attr(feature = "ts", ts(export))]
30916pub struct VIBRATION_DATA {
30917    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30918    pub time_usec: u64,
30919    #[doc = "Vibration levels on X-axis"]
30920    pub vibration_x: f32,
30921    #[doc = "Vibration levels on Y-axis"]
30922    pub vibration_y: f32,
30923    #[doc = "Vibration levels on Z-axis"]
30924    pub vibration_z: f32,
30925    #[doc = "first accelerometer clipping count"]
30926    pub clipping_0: u32,
30927    #[doc = "second accelerometer clipping count"]
30928    pub clipping_1: u32,
30929    #[doc = "third accelerometer clipping count"]
30930    pub clipping_2: u32,
30931}
30932impl VIBRATION_DATA {
30933    pub const ENCODED_LEN: usize = 32usize;
30934    pub const DEFAULT: Self = Self {
30935        time_usec: 0_u64,
30936        vibration_x: 0.0_f32,
30937        vibration_y: 0.0_f32,
30938        vibration_z: 0.0_f32,
30939        clipping_0: 0_u32,
30940        clipping_1: 0_u32,
30941        clipping_2: 0_u32,
30942    };
30943    #[cfg(feature = "arbitrary")]
30944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30945        use arbitrary::{Arbitrary, Unstructured};
30946        let mut buf = [0u8; 1024];
30947        rng.fill_bytes(&mut buf);
30948        let mut unstructured = Unstructured::new(&buf);
30949        Self::arbitrary(&mut unstructured).unwrap_or_default()
30950    }
30951}
30952impl Default for VIBRATION_DATA {
30953    fn default() -> Self {
30954        Self::DEFAULT.clone()
30955    }
30956}
30957impl MessageData for VIBRATION_DATA {
30958    type Message = MavMessage;
30959    const ID: u32 = 241u32;
30960    const NAME: &'static str = "VIBRATION";
30961    const EXTRA_CRC: u8 = 90u8;
30962    const ENCODED_LEN: usize = 32usize;
30963    fn deser(
30964        _version: MavlinkVersion,
30965        __input: &[u8],
30966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30967        let avail_len = __input.len();
30968        let mut payload_buf = [0; Self::ENCODED_LEN];
30969        let mut buf = if avail_len < Self::ENCODED_LEN {
30970            payload_buf[0..avail_len].copy_from_slice(__input);
30971            Bytes::new(&payload_buf)
30972        } else {
30973            Bytes::new(__input)
30974        };
30975        let mut __struct = Self::default();
30976        __struct.time_usec = buf.get_u64_le()?;
30977        __struct.vibration_x = buf.get_f32_le()?;
30978        __struct.vibration_y = buf.get_f32_le()?;
30979        __struct.vibration_z = buf.get_f32_le()?;
30980        __struct.clipping_0 = buf.get_u32_le()?;
30981        __struct.clipping_1 = buf.get_u32_le()?;
30982        __struct.clipping_2 = buf.get_u32_le()?;
30983        Ok(__struct)
30984    }
30985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30986        let mut __tmp = BytesMut::new(bytes);
30987        #[allow(clippy::absurd_extreme_comparisons)]
30988        #[allow(unused_comparisons)]
30989        if __tmp.remaining() < Self::ENCODED_LEN {
30990            panic!(
30991                "buffer is too small (need {} bytes, but got {})",
30992                Self::ENCODED_LEN,
30993                __tmp.remaining(),
30994            )
30995        }
30996        __tmp.put_u64_le(self.time_usec);
30997        __tmp.put_f32_le(self.vibration_x);
30998        __tmp.put_f32_le(self.vibration_y);
30999        __tmp.put_f32_le(self.vibration_z);
31000        __tmp.put_u32_le(self.clipping_0);
31001        __tmp.put_u32_le(self.clipping_1);
31002        __tmp.put_u32_le(self.clipping_2);
31003        if matches!(version, MavlinkVersion::V2) {
31004            let len = __tmp.len();
31005            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31006        } else {
31007            __tmp.len()
31008        }
31009    }
31010}
31011#[doc = "Global position estimate from a Vicon motion system source."]
31012#[doc = ""]
31013#[doc = "ID: 104"]
31014#[derive(Debug, Clone, PartialEq)]
31015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31017#[cfg_attr(feature = "ts", derive(TS))]
31018#[cfg_attr(feature = "ts", ts(export))]
31019pub struct VICON_POSITION_ESTIMATE_DATA {
31020    #[doc = "Timestamp (UNIX time or time since system boot)"]
31021    pub usec: u64,
31022    #[doc = "Global X position"]
31023    pub x: f32,
31024    #[doc = "Global Y position"]
31025    pub y: f32,
31026    #[doc = "Global Z position"]
31027    pub z: f32,
31028    #[doc = "Roll angle"]
31029    pub roll: f32,
31030    #[doc = "Pitch angle"]
31031    pub pitch: f32,
31032    #[doc = "Yaw angle"]
31033    pub yaw: f32,
31034    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31035    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31036    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31037    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31038    pub covariance: [f32; 21],
31039}
31040impl VICON_POSITION_ESTIMATE_DATA {
31041    pub const ENCODED_LEN: usize = 116usize;
31042    pub const DEFAULT: Self = Self {
31043        usec: 0_u64,
31044        x: 0.0_f32,
31045        y: 0.0_f32,
31046        z: 0.0_f32,
31047        roll: 0.0_f32,
31048        pitch: 0.0_f32,
31049        yaw: 0.0_f32,
31050        covariance: [0.0_f32; 21usize],
31051    };
31052    #[cfg(feature = "arbitrary")]
31053    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31054        use arbitrary::{Arbitrary, Unstructured};
31055        let mut buf = [0u8; 1024];
31056        rng.fill_bytes(&mut buf);
31057        let mut unstructured = Unstructured::new(&buf);
31058        Self::arbitrary(&mut unstructured).unwrap_or_default()
31059    }
31060}
31061impl Default for VICON_POSITION_ESTIMATE_DATA {
31062    fn default() -> Self {
31063        Self::DEFAULT.clone()
31064    }
31065}
31066impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31067    type Message = MavMessage;
31068    const ID: u32 = 104u32;
31069    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31070    const EXTRA_CRC: u8 = 56u8;
31071    const ENCODED_LEN: usize = 116usize;
31072    fn deser(
31073        _version: MavlinkVersion,
31074        __input: &[u8],
31075    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31076        let avail_len = __input.len();
31077        let mut payload_buf = [0; Self::ENCODED_LEN];
31078        let mut buf = if avail_len < Self::ENCODED_LEN {
31079            payload_buf[0..avail_len].copy_from_slice(__input);
31080            Bytes::new(&payload_buf)
31081        } else {
31082            Bytes::new(__input)
31083        };
31084        let mut __struct = Self::default();
31085        __struct.usec = buf.get_u64_le()?;
31086        __struct.x = buf.get_f32_le()?;
31087        __struct.y = buf.get_f32_le()?;
31088        __struct.z = buf.get_f32_le()?;
31089        __struct.roll = buf.get_f32_le()?;
31090        __struct.pitch = buf.get_f32_le()?;
31091        __struct.yaw = buf.get_f32_le()?;
31092        for v in &mut __struct.covariance {
31093            let val = buf.get_f32_le()?;
31094            *v = val;
31095        }
31096        Ok(__struct)
31097    }
31098    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31099        let mut __tmp = BytesMut::new(bytes);
31100        #[allow(clippy::absurd_extreme_comparisons)]
31101        #[allow(unused_comparisons)]
31102        if __tmp.remaining() < Self::ENCODED_LEN {
31103            panic!(
31104                "buffer is too small (need {} bytes, but got {})",
31105                Self::ENCODED_LEN,
31106                __tmp.remaining(),
31107            )
31108        }
31109        __tmp.put_u64_le(self.usec);
31110        __tmp.put_f32_le(self.x);
31111        __tmp.put_f32_le(self.y);
31112        __tmp.put_f32_le(self.z);
31113        __tmp.put_f32_le(self.roll);
31114        __tmp.put_f32_le(self.pitch);
31115        __tmp.put_f32_le(self.yaw);
31116        if matches!(version, MavlinkVersion::V2) {
31117            for val in &self.covariance {
31118                __tmp.put_f32_le(*val);
31119            }
31120            let len = __tmp.len();
31121            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31122        } else {
31123            __tmp.len()
31124        }
31125    }
31126}
31127#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31128#[doc = ""]
31129#[doc = "ID: 269"]
31130#[derive(Debug, Clone, PartialEq)]
31131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31133#[cfg_attr(feature = "ts", derive(TS))]
31134#[cfg_attr(feature = "ts", ts(export))]
31135pub struct VIDEO_STREAM_INFORMATION_DATA {
31136    #[doc = "Frame rate."]
31137    pub framerate: f32,
31138    #[doc = "Bit rate."]
31139    pub bitrate: u32,
31140    #[doc = "Bitmap of stream status flags."]
31141    pub flags: VideoStreamStatusFlags,
31142    #[doc = "Horizontal resolution."]
31143    pub resolution_h: u16,
31144    #[doc = "Vertical resolution."]
31145    pub resolution_v: u16,
31146    #[doc = "Video image rotation clockwise."]
31147    pub rotation: u16,
31148    #[doc = "Horizontal Field of view."]
31149    pub hfov: u16,
31150    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31151    pub stream_id: u8,
31152    #[doc = "Number of streams available."]
31153    pub count: u8,
31154    #[doc = "Type of stream."]
31155    pub mavtype: VideoStreamType,
31156    #[doc = "Stream name."]
31157    #[cfg_attr(feature = "ts", ts(type = "string"))]
31158    pub name: CharArray<32>,
31159    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31160    #[cfg_attr(feature = "ts", ts(type = "string"))]
31161    pub uri: CharArray<160>,
31162    #[doc = "Encoding of stream."]
31163    #[cfg_attr(feature = "serde", serde(default))]
31164    pub encoding: VideoStreamEncoding,
31165    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31166    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31167    pub camera_device_id: u8,
31168}
31169impl VIDEO_STREAM_INFORMATION_DATA {
31170    pub const ENCODED_LEN: usize = 215usize;
31171    pub const DEFAULT: Self = Self {
31172        framerate: 0.0_f32,
31173        bitrate: 0_u32,
31174        flags: VideoStreamStatusFlags::DEFAULT,
31175        resolution_h: 0_u16,
31176        resolution_v: 0_u16,
31177        rotation: 0_u16,
31178        hfov: 0_u16,
31179        stream_id: 0_u8,
31180        count: 0_u8,
31181        mavtype: VideoStreamType::DEFAULT,
31182        name: CharArray::new([0_u8; 32usize]),
31183        uri: CharArray::new([0_u8; 160usize]),
31184        encoding: VideoStreamEncoding::DEFAULT,
31185        camera_device_id: 0_u8,
31186    };
31187    #[cfg(feature = "arbitrary")]
31188    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31189        use arbitrary::{Arbitrary, Unstructured};
31190        let mut buf = [0u8; 1024];
31191        rng.fill_bytes(&mut buf);
31192        let mut unstructured = Unstructured::new(&buf);
31193        Self::arbitrary(&mut unstructured).unwrap_or_default()
31194    }
31195}
31196impl Default for VIDEO_STREAM_INFORMATION_DATA {
31197    fn default() -> Self {
31198        Self::DEFAULT.clone()
31199    }
31200}
31201impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31202    type Message = MavMessage;
31203    const ID: u32 = 269u32;
31204    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31205    const EXTRA_CRC: u8 = 109u8;
31206    const ENCODED_LEN: usize = 215usize;
31207    fn deser(
31208        _version: MavlinkVersion,
31209        __input: &[u8],
31210    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31211        let avail_len = __input.len();
31212        let mut payload_buf = [0; Self::ENCODED_LEN];
31213        let mut buf = if avail_len < Self::ENCODED_LEN {
31214            payload_buf[0..avail_len].copy_from_slice(__input);
31215            Bytes::new(&payload_buf)
31216        } else {
31217            Bytes::new(__input)
31218        };
31219        let mut __struct = Self::default();
31220        __struct.framerate = buf.get_f32_le()?;
31221        __struct.bitrate = buf.get_u32_le()?;
31222        let tmp = buf.get_u16_le()?;
31223        __struct.flags =
31224            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
31225                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31226                    flag_type: "VideoStreamStatusFlags",
31227                    value: tmp as u64,
31228                })?;
31229        __struct.resolution_h = buf.get_u16_le()?;
31230        __struct.resolution_v = buf.get_u16_le()?;
31231        __struct.rotation = buf.get_u16_le()?;
31232        __struct.hfov = buf.get_u16_le()?;
31233        __struct.stream_id = buf.get_u8()?;
31234        __struct.count = buf.get_u8()?;
31235        let tmp = buf.get_u8()?;
31236        __struct.mavtype =
31237            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31238                enum_type: "VideoStreamType",
31239                value: tmp as u64,
31240            })?;
31241        let mut tmp = [0_u8; 32usize];
31242        for v in &mut tmp {
31243            *v = buf.get_u8()?;
31244        }
31245        __struct.name = CharArray::new(tmp);
31246        let mut tmp = [0_u8; 160usize];
31247        for v in &mut tmp {
31248            *v = buf.get_u8()?;
31249        }
31250        __struct.uri = CharArray::new(tmp);
31251        let tmp = buf.get_u8()?;
31252        __struct.encoding =
31253            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31254                enum_type: "VideoStreamEncoding",
31255                value: tmp as u64,
31256            })?;
31257        __struct.camera_device_id = buf.get_u8()?;
31258        Ok(__struct)
31259    }
31260    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31261        let mut __tmp = BytesMut::new(bytes);
31262        #[allow(clippy::absurd_extreme_comparisons)]
31263        #[allow(unused_comparisons)]
31264        if __tmp.remaining() < Self::ENCODED_LEN {
31265            panic!(
31266                "buffer is too small (need {} bytes, but got {})",
31267                Self::ENCODED_LEN,
31268                __tmp.remaining(),
31269            )
31270        }
31271        __tmp.put_f32_le(self.framerate);
31272        __tmp.put_u32_le(self.bitrate);
31273        __tmp.put_u16_le(self.flags.bits() as u16);
31274        __tmp.put_u16_le(self.resolution_h);
31275        __tmp.put_u16_le(self.resolution_v);
31276        __tmp.put_u16_le(self.rotation);
31277        __tmp.put_u16_le(self.hfov);
31278        __tmp.put_u8(self.stream_id);
31279        __tmp.put_u8(self.count);
31280        __tmp.put_u8(self.mavtype as u8);
31281        for val in &self.name {
31282            __tmp.put_u8(*val);
31283        }
31284        for val in &self.uri {
31285            __tmp.put_u8(*val);
31286        }
31287        if matches!(version, MavlinkVersion::V2) {
31288            __tmp.put_u8(self.encoding as u8);
31289            __tmp.put_u8(self.camera_device_id);
31290            let len = __tmp.len();
31291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31292        } else {
31293            __tmp.len()
31294        }
31295    }
31296}
31297#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31298#[doc = ""]
31299#[doc = "ID: 270"]
31300#[derive(Debug, Clone, PartialEq)]
31301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31303#[cfg_attr(feature = "ts", derive(TS))]
31304#[cfg_attr(feature = "ts", ts(export))]
31305pub struct VIDEO_STREAM_STATUS_DATA {
31306    #[doc = "Frame rate"]
31307    pub framerate: f32,
31308    #[doc = "Bit rate"]
31309    pub bitrate: u32,
31310    #[doc = "Bitmap of stream status flags"]
31311    pub flags: VideoStreamStatusFlags,
31312    #[doc = "Horizontal resolution"]
31313    pub resolution_h: u16,
31314    #[doc = "Vertical resolution"]
31315    pub resolution_v: u16,
31316    #[doc = "Video image rotation clockwise"]
31317    pub rotation: u16,
31318    #[doc = "Horizontal Field of view"]
31319    pub hfov: u16,
31320    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31321    pub stream_id: u8,
31322    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31323    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31324    pub camera_device_id: u8,
31325}
31326impl VIDEO_STREAM_STATUS_DATA {
31327    pub const ENCODED_LEN: usize = 20usize;
31328    pub const DEFAULT: Self = Self {
31329        framerate: 0.0_f32,
31330        bitrate: 0_u32,
31331        flags: VideoStreamStatusFlags::DEFAULT,
31332        resolution_h: 0_u16,
31333        resolution_v: 0_u16,
31334        rotation: 0_u16,
31335        hfov: 0_u16,
31336        stream_id: 0_u8,
31337        camera_device_id: 0_u8,
31338    };
31339    #[cfg(feature = "arbitrary")]
31340    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31341        use arbitrary::{Arbitrary, Unstructured};
31342        let mut buf = [0u8; 1024];
31343        rng.fill_bytes(&mut buf);
31344        let mut unstructured = Unstructured::new(&buf);
31345        Self::arbitrary(&mut unstructured).unwrap_or_default()
31346    }
31347}
31348impl Default for VIDEO_STREAM_STATUS_DATA {
31349    fn default() -> Self {
31350        Self::DEFAULT.clone()
31351    }
31352}
31353impl MessageData for VIDEO_STREAM_STATUS_DATA {
31354    type Message = MavMessage;
31355    const ID: u32 = 270u32;
31356    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31357    const EXTRA_CRC: u8 = 59u8;
31358    const ENCODED_LEN: usize = 20usize;
31359    fn deser(
31360        _version: MavlinkVersion,
31361        __input: &[u8],
31362    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31363        let avail_len = __input.len();
31364        let mut payload_buf = [0; Self::ENCODED_LEN];
31365        let mut buf = if avail_len < Self::ENCODED_LEN {
31366            payload_buf[0..avail_len].copy_from_slice(__input);
31367            Bytes::new(&payload_buf)
31368        } else {
31369            Bytes::new(__input)
31370        };
31371        let mut __struct = Self::default();
31372        __struct.framerate = buf.get_f32_le()?;
31373        __struct.bitrate = buf.get_u32_le()?;
31374        let tmp = buf.get_u16_le()?;
31375        __struct.flags =
31376            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
31377                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31378                    flag_type: "VideoStreamStatusFlags",
31379                    value: tmp as u64,
31380                })?;
31381        __struct.resolution_h = buf.get_u16_le()?;
31382        __struct.resolution_v = buf.get_u16_le()?;
31383        __struct.rotation = buf.get_u16_le()?;
31384        __struct.hfov = buf.get_u16_le()?;
31385        __struct.stream_id = buf.get_u8()?;
31386        __struct.camera_device_id = buf.get_u8()?;
31387        Ok(__struct)
31388    }
31389    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31390        let mut __tmp = BytesMut::new(bytes);
31391        #[allow(clippy::absurd_extreme_comparisons)]
31392        #[allow(unused_comparisons)]
31393        if __tmp.remaining() < Self::ENCODED_LEN {
31394            panic!(
31395                "buffer is too small (need {} bytes, but got {})",
31396                Self::ENCODED_LEN,
31397                __tmp.remaining(),
31398            )
31399        }
31400        __tmp.put_f32_le(self.framerate);
31401        __tmp.put_u32_le(self.bitrate);
31402        __tmp.put_u16_le(self.flags.bits() as u16);
31403        __tmp.put_u16_le(self.resolution_h);
31404        __tmp.put_u16_le(self.resolution_v);
31405        __tmp.put_u16_le(self.rotation);
31406        __tmp.put_u16_le(self.hfov);
31407        __tmp.put_u8(self.stream_id);
31408        if matches!(version, MavlinkVersion::V2) {
31409            __tmp.put_u8(self.camera_device_id);
31410            let len = __tmp.len();
31411            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31412        } else {
31413            __tmp.len()
31414        }
31415    }
31416}
31417#[doc = "Local position/attitude estimate from a vision source."]
31418#[doc = ""]
31419#[doc = "ID: 102"]
31420#[derive(Debug, Clone, PartialEq)]
31421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31423#[cfg_attr(feature = "ts", derive(TS))]
31424#[cfg_attr(feature = "ts", ts(export))]
31425pub struct VISION_POSITION_ESTIMATE_DATA {
31426    #[doc = "Timestamp (UNIX time or time since system boot)"]
31427    pub usec: u64,
31428    #[doc = "Local X position"]
31429    pub x: f32,
31430    #[doc = "Local Y position"]
31431    pub y: f32,
31432    #[doc = "Local Z position"]
31433    pub z: f32,
31434    #[doc = "Roll angle"]
31435    pub roll: f32,
31436    #[doc = "Pitch angle"]
31437    pub pitch: f32,
31438    #[doc = "Yaw angle"]
31439    pub yaw: f32,
31440    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31441    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31442    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31443    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31444    pub covariance: [f32; 21],
31445    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31446    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31447    pub reset_counter: u8,
31448}
31449impl VISION_POSITION_ESTIMATE_DATA {
31450    pub const ENCODED_LEN: usize = 117usize;
31451    pub const DEFAULT: Self = Self {
31452        usec: 0_u64,
31453        x: 0.0_f32,
31454        y: 0.0_f32,
31455        z: 0.0_f32,
31456        roll: 0.0_f32,
31457        pitch: 0.0_f32,
31458        yaw: 0.0_f32,
31459        covariance: [0.0_f32; 21usize],
31460        reset_counter: 0_u8,
31461    };
31462    #[cfg(feature = "arbitrary")]
31463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31464        use arbitrary::{Arbitrary, Unstructured};
31465        let mut buf = [0u8; 1024];
31466        rng.fill_bytes(&mut buf);
31467        let mut unstructured = Unstructured::new(&buf);
31468        Self::arbitrary(&mut unstructured).unwrap_or_default()
31469    }
31470}
31471impl Default for VISION_POSITION_ESTIMATE_DATA {
31472    fn default() -> Self {
31473        Self::DEFAULT.clone()
31474    }
31475}
31476impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31477    type Message = MavMessage;
31478    const ID: u32 = 102u32;
31479    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31480    const EXTRA_CRC: u8 = 158u8;
31481    const ENCODED_LEN: usize = 117usize;
31482    fn deser(
31483        _version: MavlinkVersion,
31484        __input: &[u8],
31485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31486        let avail_len = __input.len();
31487        let mut payload_buf = [0; Self::ENCODED_LEN];
31488        let mut buf = if avail_len < Self::ENCODED_LEN {
31489            payload_buf[0..avail_len].copy_from_slice(__input);
31490            Bytes::new(&payload_buf)
31491        } else {
31492            Bytes::new(__input)
31493        };
31494        let mut __struct = Self::default();
31495        __struct.usec = buf.get_u64_le()?;
31496        __struct.x = buf.get_f32_le()?;
31497        __struct.y = buf.get_f32_le()?;
31498        __struct.z = buf.get_f32_le()?;
31499        __struct.roll = buf.get_f32_le()?;
31500        __struct.pitch = buf.get_f32_le()?;
31501        __struct.yaw = buf.get_f32_le()?;
31502        for v in &mut __struct.covariance {
31503            let val = buf.get_f32_le()?;
31504            *v = val;
31505        }
31506        __struct.reset_counter = buf.get_u8()?;
31507        Ok(__struct)
31508    }
31509    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31510        let mut __tmp = BytesMut::new(bytes);
31511        #[allow(clippy::absurd_extreme_comparisons)]
31512        #[allow(unused_comparisons)]
31513        if __tmp.remaining() < Self::ENCODED_LEN {
31514            panic!(
31515                "buffer is too small (need {} bytes, but got {})",
31516                Self::ENCODED_LEN,
31517                __tmp.remaining(),
31518            )
31519        }
31520        __tmp.put_u64_le(self.usec);
31521        __tmp.put_f32_le(self.x);
31522        __tmp.put_f32_le(self.y);
31523        __tmp.put_f32_le(self.z);
31524        __tmp.put_f32_le(self.roll);
31525        __tmp.put_f32_le(self.pitch);
31526        __tmp.put_f32_le(self.yaw);
31527        if matches!(version, MavlinkVersion::V2) {
31528            for val in &self.covariance {
31529                __tmp.put_f32_le(*val);
31530            }
31531            __tmp.put_u8(self.reset_counter);
31532            let len = __tmp.len();
31533            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31534        } else {
31535            __tmp.len()
31536        }
31537    }
31538}
31539#[doc = "Speed estimate from a vision source."]
31540#[doc = ""]
31541#[doc = "ID: 103"]
31542#[derive(Debug, Clone, PartialEq)]
31543#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31545#[cfg_attr(feature = "ts", derive(TS))]
31546#[cfg_attr(feature = "ts", ts(export))]
31547pub struct VISION_SPEED_ESTIMATE_DATA {
31548    #[doc = "Timestamp (UNIX time or time since system boot)"]
31549    pub usec: u64,
31550    #[doc = "Global X speed"]
31551    pub x: f32,
31552    #[doc = "Global Y speed"]
31553    pub y: f32,
31554    #[doc = "Global Z speed"]
31555    pub z: f32,
31556    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
31557    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31558    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31559    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31560    pub covariance: [f32; 9],
31561    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31562    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31563    pub reset_counter: u8,
31564}
31565impl VISION_SPEED_ESTIMATE_DATA {
31566    pub const ENCODED_LEN: usize = 57usize;
31567    pub const DEFAULT: Self = Self {
31568        usec: 0_u64,
31569        x: 0.0_f32,
31570        y: 0.0_f32,
31571        z: 0.0_f32,
31572        covariance: [0.0_f32; 9usize],
31573        reset_counter: 0_u8,
31574    };
31575    #[cfg(feature = "arbitrary")]
31576    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31577        use arbitrary::{Arbitrary, Unstructured};
31578        let mut buf = [0u8; 1024];
31579        rng.fill_bytes(&mut buf);
31580        let mut unstructured = Unstructured::new(&buf);
31581        Self::arbitrary(&mut unstructured).unwrap_or_default()
31582    }
31583}
31584impl Default for VISION_SPEED_ESTIMATE_DATA {
31585    fn default() -> Self {
31586        Self::DEFAULT.clone()
31587    }
31588}
31589impl MessageData for VISION_SPEED_ESTIMATE_DATA {
31590    type Message = MavMessage;
31591    const ID: u32 = 103u32;
31592    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
31593    const EXTRA_CRC: u8 = 208u8;
31594    const ENCODED_LEN: usize = 57usize;
31595    fn deser(
31596        _version: MavlinkVersion,
31597        __input: &[u8],
31598    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31599        let avail_len = __input.len();
31600        let mut payload_buf = [0; Self::ENCODED_LEN];
31601        let mut buf = if avail_len < Self::ENCODED_LEN {
31602            payload_buf[0..avail_len].copy_from_slice(__input);
31603            Bytes::new(&payload_buf)
31604        } else {
31605            Bytes::new(__input)
31606        };
31607        let mut __struct = Self::default();
31608        __struct.usec = buf.get_u64_le()?;
31609        __struct.x = buf.get_f32_le()?;
31610        __struct.y = buf.get_f32_le()?;
31611        __struct.z = buf.get_f32_le()?;
31612        for v in &mut __struct.covariance {
31613            let val = buf.get_f32_le()?;
31614            *v = val;
31615        }
31616        __struct.reset_counter = buf.get_u8()?;
31617        Ok(__struct)
31618    }
31619    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31620        let mut __tmp = BytesMut::new(bytes);
31621        #[allow(clippy::absurd_extreme_comparisons)]
31622        #[allow(unused_comparisons)]
31623        if __tmp.remaining() < Self::ENCODED_LEN {
31624            panic!(
31625                "buffer is too small (need {} bytes, but got {})",
31626                Self::ENCODED_LEN,
31627                __tmp.remaining(),
31628            )
31629        }
31630        __tmp.put_u64_le(self.usec);
31631        __tmp.put_f32_le(self.x);
31632        __tmp.put_f32_le(self.y);
31633        __tmp.put_f32_le(self.z);
31634        if matches!(version, MavlinkVersion::V2) {
31635            for val in &self.covariance {
31636                __tmp.put_f32_le(*val);
31637            }
31638            __tmp.put_u8(self.reset_counter);
31639            let len = __tmp.len();
31640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31641        } else {
31642            __tmp.len()
31643        }
31644    }
31645}
31646#[doc = "Cumulative distance traveled for each reported wheel."]
31647#[doc = ""]
31648#[doc = "ID: 9000"]
31649#[derive(Debug, Clone, PartialEq)]
31650#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31652#[cfg_attr(feature = "ts", derive(TS))]
31653#[cfg_attr(feature = "ts", ts(export))]
31654pub struct WHEEL_DISTANCE_DATA {
31655    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
31656    pub time_usec: u64,
31657    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
31658    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31659    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31660    pub distance: [f64; 16],
31661    #[doc = "Number of wheels reported."]
31662    pub count: u8,
31663}
31664impl WHEEL_DISTANCE_DATA {
31665    pub const ENCODED_LEN: usize = 137usize;
31666    pub const DEFAULT: Self = Self {
31667        time_usec: 0_u64,
31668        distance: [0.0_f64; 16usize],
31669        count: 0_u8,
31670    };
31671    #[cfg(feature = "arbitrary")]
31672    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31673        use arbitrary::{Arbitrary, Unstructured};
31674        let mut buf = [0u8; 1024];
31675        rng.fill_bytes(&mut buf);
31676        let mut unstructured = Unstructured::new(&buf);
31677        Self::arbitrary(&mut unstructured).unwrap_or_default()
31678    }
31679}
31680impl Default for WHEEL_DISTANCE_DATA {
31681    fn default() -> Self {
31682        Self::DEFAULT.clone()
31683    }
31684}
31685impl MessageData for WHEEL_DISTANCE_DATA {
31686    type Message = MavMessage;
31687    const ID: u32 = 9000u32;
31688    const NAME: &'static str = "WHEEL_DISTANCE";
31689    const EXTRA_CRC: u8 = 113u8;
31690    const ENCODED_LEN: usize = 137usize;
31691    fn deser(
31692        _version: MavlinkVersion,
31693        __input: &[u8],
31694    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31695        let avail_len = __input.len();
31696        let mut payload_buf = [0; Self::ENCODED_LEN];
31697        let mut buf = if avail_len < Self::ENCODED_LEN {
31698            payload_buf[0..avail_len].copy_from_slice(__input);
31699            Bytes::new(&payload_buf)
31700        } else {
31701            Bytes::new(__input)
31702        };
31703        let mut __struct = Self::default();
31704        __struct.time_usec = buf.get_u64_le()?;
31705        for v in &mut __struct.distance {
31706            let val = buf.get_f64_le()?;
31707            *v = val;
31708        }
31709        __struct.count = buf.get_u8()?;
31710        Ok(__struct)
31711    }
31712    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31713        let mut __tmp = BytesMut::new(bytes);
31714        #[allow(clippy::absurd_extreme_comparisons)]
31715        #[allow(unused_comparisons)]
31716        if __tmp.remaining() < Self::ENCODED_LEN {
31717            panic!(
31718                "buffer is too small (need {} bytes, but got {})",
31719                Self::ENCODED_LEN,
31720                __tmp.remaining(),
31721            )
31722        }
31723        __tmp.put_u64_le(self.time_usec);
31724        for val in &self.distance {
31725            __tmp.put_f64_le(*val);
31726        }
31727        __tmp.put_u8(self.count);
31728        if matches!(version, MavlinkVersion::V2) {
31729            let len = __tmp.len();
31730            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31731        } else {
31732            __tmp.len()
31733        }
31734    }
31735}
31736#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
31737#[doc = ""]
31738#[doc = "ID: 299"]
31739#[derive(Debug, Clone, PartialEq)]
31740#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31741#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31742#[cfg_attr(feature = "ts", derive(TS))]
31743#[cfg_attr(feature = "ts", ts(export))]
31744pub struct WIFI_CONFIG_AP_DATA {
31745    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
31746    #[cfg_attr(feature = "ts", ts(type = "string"))]
31747    pub ssid: CharArray<32>,
31748    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
31749    #[cfg_attr(feature = "ts", ts(type = "string"))]
31750    pub password: CharArray<64>,
31751    #[doc = "WiFi Mode."]
31752    #[cfg_attr(feature = "serde", serde(default))]
31753    pub mode: WifiConfigApMode,
31754    #[doc = "Message acceptance response (sent back to GS)."]
31755    #[cfg_attr(feature = "serde", serde(default))]
31756    pub response: WifiConfigApResponse,
31757}
31758impl WIFI_CONFIG_AP_DATA {
31759    pub const ENCODED_LEN: usize = 98usize;
31760    pub const DEFAULT: Self = Self {
31761        ssid: CharArray::new([0_u8; 32usize]),
31762        password: CharArray::new([0_u8; 64usize]),
31763        mode: WifiConfigApMode::DEFAULT,
31764        response: WifiConfigApResponse::DEFAULT,
31765    };
31766    #[cfg(feature = "arbitrary")]
31767    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31768        use arbitrary::{Arbitrary, Unstructured};
31769        let mut buf = [0u8; 1024];
31770        rng.fill_bytes(&mut buf);
31771        let mut unstructured = Unstructured::new(&buf);
31772        Self::arbitrary(&mut unstructured).unwrap_or_default()
31773    }
31774}
31775impl Default for WIFI_CONFIG_AP_DATA {
31776    fn default() -> Self {
31777        Self::DEFAULT.clone()
31778    }
31779}
31780impl MessageData for WIFI_CONFIG_AP_DATA {
31781    type Message = MavMessage;
31782    const ID: u32 = 299u32;
31783    const NAME: &'static str = "WIFI_CONFIG_AP";
31784    const EXTRA_CRC: u8 = 19u8;
31785    const ENCODED_LEN: usize = 98usize;
31786    fn deser(
31787        _version: MavlinkVersion,
31788        __input: &[u8],
31789    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31790        let avail_len = __input.len();
31791        let mut payload_buf = [0; Self::ENCODED_LEN];
31792        let mut buf = if avail_len < Self::ENCODED_LEN {
31793            payload_buf[0..avail_len].copy_from_slice(__input);
31794            Bytes::new(&payload_buf)
31795        } else {
31796            Bytes::new(__input)
31797        };
31798        let mut __struct = Self::default();
31799        let mut tmp = [0_u8; 32usize];
31800        for v in &mut tmp {
31801            *v = buf.get_u8()?;
31802        }
31803        __struct.ssid = CharArray::new(tmp);
31804        let mut tmp = [0_u8; 64usize];
31805        for v in &mut tmp {
31806            *v = buf.get_u8()?;
31807        }
31808        __struct.password = CharArray::new(tmp);
31809        let tmp = buf.get_i8()?;
31810        __struct.mode =
31811            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31812                enum_type: "WifiConfigApMode",
31813                value: tmp as u64,
31814            })?;
31815        let tmp = buf.get_i8()?;
31816        __struct.response =
31817            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31818                enum_type: "WifiConfigApResponse",
31819                value: tmp as u64,
31820            })?;
31821        Ok(__struct)
31822    }
31823    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31824        let mut __tmp = BytesMut::new(bytes);
31825        #[allow(clippy::absurd_extreme_comparisons)]
31826        #[allow(unused_comparisons)]
31827        if __tmp.remaining() < Self::ENCODED_LEN {
31828            panic!(
31829                "buffer is too small (need {} bytes, but got {})",
31830                Self::ENCODED_LEN,
31831                __tmp.remaining(),
31832            )
31833        }
31834        for val in &self.ssid {
31835            __tmp.put_u8(*val);
31836        }
31837        for val in &self.password {
31838            __tmp.put_u8(*val);
31839        }
31840        if matches!(version, MavlinkVersion::V2) {
31841            __tmp.put_i8(self.mode as i8);
31842            __tmp.put_i8(self.response as i8);
31843            let len = __tmp.len();
31844            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31845        } else {
31846            __tmp.len()
31847        }
31848    }
31849}
31850#[doc = "Winch status."]
31851#[doc = ""]
31852#[doc = "ID: 9005"]
31853#[derive(Debug, Clone, PartialEq)]
31854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31856#[cfg_attr(feature = "ts", derive(TS))]
31857#[cfg_attr(feature = "ts", ts(export))]
31858pub struct WINCH_STATUS_DATA {
31859    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
31860    pub time_usec: u64,
31861    #[doc = "Length of line released. NaN if unknown"]
31862    pub line_length: f32,
31863    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
31864    pub speed: f32,
31865    #[doc = "Tension on the line. NaN if unknown"]
31866    pub tension: f32,
31867    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
31868    pub voltage: f32,
31869    #[doc = "Current draw from the winch. NaN if unknown"]
31870    pub current: f32,
31871    #[doc = "Status flags"]
31872    pub status: MavWinchStatusFlag,
31873    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
31874    pub temperature: i16,
31875}
31876impl WINCH_STATUS_DATA {
31877    pub const ENCODED_LEN: usize = 34usize;
31878    pub const DEFAULT: Self = Self {
31879        time_usec: 0_u64,
31880        line_length: 0.0_f32,
31881        speed: 0.0_f32,
31882        tension: 0.0_f32,
31883        voltage: 0.0_f32,
31884        current: 0.0_f32,
31885        status: MavWinchStatusFlag::DEFAULT,
31886        temperature: 0_i16,
31887    };
31888    #[cfg(feature = "arbitrary")]
31889    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31890        use arbitrary::{Arbitrary, Unstructured};
31891        let mut buf = [0u8; 1024];
31892        rng.fill_bytes(&mut buf);
31893        let mut unstructured = Unstructured::new(&buf);
31894        Self::arbitrary(&mut unstructured).unwrap_or_default()
31895    }
31896}
31897impl Default for WINCH_STATUS_DATA {
31898    fn default() -> Self {
31899        Self::DEFAULT.clone()
31900    }
31901}
31902impl MessageData for WINCH_STATUS_DATA {
31903    type Message = MavMessage;
31904    const ID: u32 = 9005u32;
31905    const NAME: &'static str = "WINCH_STATUS";
31906    const EXTRA_CRC: u8 = 117u8;
31907    const ENCODED_LEN: usize = 34usize;
31908    fn deser(
31909        _version: MavlinkVersion,
31910        __input: &[u8],
31911    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31912        let avail_len = __input.len();
31913        let mut payload_buf = [0; Self::ENCODED_LEN];
31914        let mut buf = if avail_len < Self::ENCODED_LEN {
31915            payload_buf[0..avail_len].copy_from_slice(__input);
31916            Bytes::new(&payload_buf)
31917        } else {
31918            Bytes::new(__input)
31919        };
31920        let mut __struct = Self::default();
31921        __struct.time_usec = buf.get_u64_le()?;
31922        __struct.line_length = buf.get_f32_le()?;
31923        __struct.speed = buf.get_f32_le()?;
31924        __struct.tension = buf.get_f32_le()?;
31925        __struct.voltage = buf.get_f32_le()?;
31926        __struct.current = buf.get_f32_le()?;
31927        let tmp = buf.get_u32_le()?;
31928        __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
31929            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31930                flag_type: "MavWinchStatusFlag",
31931                value: tmp as u64,
31932            })?;
31933        __struct.temperature = buf.get_i16_le()?;
31934        Ok(__struct)
31935    }
31936    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31937        let mut __tmp = BytesMut::new(bytes);
31938        #[allow(clippy::absurd_extreme_comparisons)]
31939        #[allow(unused_comparisons)]
31940        if __tmp.remaining() < Self::ENCODED_LEN {
31941            panic!(
31942                "buffer is too small (need {} bytes, but got {})",
31943                Self::ENCODED_LEN,
31944                __tmp.remaining(),
31945            )
31946        }
31947        __tmp.put_u64_le(self.time_usec);
31948        __tmp.put_f32_le(self.line_length);
31949        __tmp.put_f32_le(self.speed);
31950        __tmp.put_f32_le(self.tension);
31951        __tmp.put_f32_le(self.voltage);
31952        __tmp.put_f32_le(self.current);
31953        __tmp.put_u32_le(self.status.bits() as u32);
31954        __tmp.put_i16_le(self.temperature);
31955        if matches!(version, MavlinkVersion::V2) {
31956            let len = __tmp.len();
31957            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31958        } else {
31959            __tmp.len()
31960        }
31961    }
31962}
31963#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
31964#[doc = ""]
31965#[doc = "ID: 231"]
31966#[derive(Debug, Clone, PartialEq)]
31967#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31968#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31969#[cfg_attr(feature = "ts", derive(TS))]
31970#[cfg_attr(feature = "ts", ts(export))]
31971pub struct WIND_COV_DATA {
31972    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31973    pub time_usec: u64,
31974    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
31975    pub wind_x: f32,
31976    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
31977    pub wind_y: f32,
31978    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
31979    pub wind_z: f32,
31980    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
31981    pub var_horiz: f32,
31982    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
31983    pub var_vert: f32,
31984    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
31985    pub wind_alt: f32,
31986    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
31987    pub horiz_accuracy: f32,
31988    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
31989    pub vert_accuracy: f32,
31990}
31991impl WIND_COV_DATA {
31992    pub const ENCODED_LEN: usize = 40usize;
31993    pub const DEFAULT: Self = Self {
31994        time_usec: 0_u64,
31995        wind_x: 0.0_f32,
31996        wind_y: 0.0_f32,
31997        wind_z: 0.0_f32,
31998        var_horiz: 0.0_f32,
31999        var_vert: 0.0_f32,
32000        wind_alt: 0.0_f32,
32001        horiz_accuracy: 0.0_f32,
32002        vert_accuracy: 0.0_f32,
32003    };
32004    #[cfg(feature = "arbitrary")]
32005    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32006        use arbitrary::{Arbitrary, Unstructured};
32007        let mut buf = [0u8; 1024];
32008        rng.fill_bytes(&mut buf);
32009        let mut unstructured = Unstructured::new(&buf);
32010        Self::arbitrary(&mut unstructured).unwrap_or_default()
32011    }
32012}
32013impl Default for WIND_COV_DATA {
32014    fn default() -> Self {
32015        Self::DEFAULT.clone()
32016    }
32017}
32018impl MessageData for WIND_COV_DATA {
32019    type Message = MavMessage;
32020    const ID: u32 = 231u32;
32021    const NAME: &'static str = "WIND_COV";
32022    const EXTRA_CRC: u8 = 105u8;
32023    const ENCODED_LEN: usize = 40usize;
32024    fn deser(
32025        _version: MavlinkVersion,
32026        __input: &[u8],
32027    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32028        let avail_len = __input.len();
32029        let mut payload_buf = [0; Self::ENCODED_LEN];
32030        let mut buf = if avail_len < Self::ENCODED_LEN {
32031            payload_buf[0..avail_len].copy_from_slice(__input);
32032            Bytes::new(&payload_buf)
32033        } else {
32034            Bytes::new(__input)
32035        };
32036        let mut __struct = Self::default();
32037        __struct.time_usec = buf.get_u64_le()?;
32038        __struct.wind_x = buf.get_f32_le()?;
32039        __struct.wind_y = buf.get_f32_le()?;
32040        __struct.wind_z = buf.get_f32_le()?;
32041        __struct.var_horiz = buf.get_f32_le()?;
32042        __struct.var_vert = buf.get_f32_le()?;
32043        __struct.wind_alt = buf.get_f32_le()?;
32044        __struct.horiz_accuracy = buf.get_f32_le()?;
32045        __struct.vert_accuracy = buf.get_f32_le()?;
32046        Ok(__struct)
32047    }
32048    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32049        let mut __tmp = BytesMut::new(bytes);
32050        #[allow(clippy::absurd_extreme_comparisons)]
32051        #[allow(unused_comparisons)]
32052        if __tmp.remaining() < Self::ENCODED_LEN {
32053            panic!(
32054                "buffer is too small (need {} bytes, but got {})",
32055                Self::ENCODED_LEN,
32056                __tmp.remaining(),
32057            )
32058        }
32059        __tmp.put_u64_le(self.time_usec);
32060        __tmp.put_f32_le(self.wind_x);
32061        __tmp.put_f32_le(self.wind_y);
32062        __tmp.put_f32_le(self.wind_z);
32063        __tmp.put_f32_le(self.var_horiz);
32064        __tmp.put_f32_le(self.var_vert);
32065        __tmp.put_f32_le(self.wind_alt);
32066        __tmp.put_f32_le(self.horiz_accuracy);
32067        __tmp.put_f32_le(self.vert_accuracy);
32068        if matches!(version, MavlinkVersion::V2) {
32069            let len = __tmp.len();
32070            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32071        } else {
32072            __tmp.len()
32073        }
32074    }
32075}
32076#[derive(Clone, PartialEq, Debug)]
32077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32078#[cfg_attr(feature = "serde", serde(tag = "type"))]
32079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32080#[cfg_attr(feature = "ts", derive(TS))]
32081#[cfg_attr(feature = "ts", ts(export))]
32082#[repr(u32)]
32083pub enum MavMessage {
32084    #[doc = "Set the vehicle attitude and body angular rates."]
32085    #[doc = ""]
32086    #[doc = "ID: 140"]
32087    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32088    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32089    #[doc = ""]
32090    #[doc = "ID: 375"]
32091    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32092    #[doc = "The location and information of an ADSB vehicle."]
32093    #[doc = ""]
32094    #[doc = "ID: 246"]
32095    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32096    #[doc = "The location and information of an AIS vessel."]
32097    #[doc = ""]
32098    #[doc = "ID: 301"]
32099    AIS_VESSEL(AIS_VESSEL_DATA),
32100    #[doc = "The current system altitude."]
32101    #[doc = ""]
32102    #[doc = "ID: 141"]
32103    ALTITUDE(ALTITUDE_DATA),
32104    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32105    #[doc = ""]
32106    #[doc = "ID: 30"]
32107    ATTITUDE(ATTITUDE_DATA),
32108    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32109    #[doc = ""]
32110    #[doc = "ID: 31"]
32111    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32112    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32113    #[doc = ""]
32114    #[doc = "ID: 61"]
32115    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32116    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32117    #[doc = ""]
32118    #[doc = "ID: 83"]
32119    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32120    #[doc = "Motion capture attitude and position."]
32121    #[doc = ""]
32122    #[doc = "ID: 138"]
32123    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32124    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32125    #[doc = ""]
32126    #[doc = "ID: 7"]
32127    AUTH_KEY(AUTH_KEY_DATA),
32128    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32129    #[doc = ""]
32130    #[doc = "ID: 286"]
32131    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32132    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32133    #[doc = ""]
32134    #[doc = "ID: 148"]
32135    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32136    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32137    #[doc = ""]
32138    #[doc = "ID: 435"]
32139    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32140    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32141    #[doc = ""]
32142    #[doc = "ID: 437"]
32143    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32144    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32145    #[doc = ""]
32146    #[doc = "ID: 372"]
32147    BATTERY_INFO(BATTERY_INFO_DATA),
32148    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32149    #[doc = ""]
32150    #[doc = "ID: 147"]
32151    BATTERY_STATUS(BATTERY_STATUS_DATA),
32152    #[doc = "Report button state change."]
32153    #[doc = ""]
32154    #[doc = "ID: 257"]
32155    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32156    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32157    #[doc = ""]
32158    #[doc = "ID: 262"]
32159    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32160    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32161    #[doc = ""]
32162    #[doc = "ID: 271"]
32163    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32164    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32165    #[doc = ""]
32166    #[doc = "ID: 263"]
32167    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32168    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32169    #[doc = ""]
32170    #[doc = "ID: 259"]
32171    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32172    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32173    #[doc = ""]
32174    #[doc = "ID: 260"]
32175    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32176    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32177    #[doc = ""]
32178    #[doc = "ID: 277"]
32179    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32180    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32181    #[doc = ""]
32182    #[doc = "ID: 276"]
32183    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32184    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32185    #[doc = ""]
32186    #[doc = "ID: 275"]
32187    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32188    #[doc = "Camera-IMU triggering and synchronisation message."]
32189    #[doc = ""]
32190    #[doc = "ID: 112"]
32191    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32192    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
32193    #[doc = ""]
32194    #[doc = "ID: 387"]
32195    CANFD_FRAME(CANFD_FRAME_DATA),
32196    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
32197    #[doc = ""]
32198    #[doc = "ID: 388"]
32199    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32200    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
32201    #[doc = ""]
32202    #[doc = "ID: 386"]
32203    CAN_FRAME(CAN_FRAME_DATA),
32204    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32205    #[doc = ""]
32206    #[doc = "ID: 336"]
32207    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32208    #[doc = "Report current used cellular network status."]
32209    #[doc = ""]
32210    #[doc = "ID: 334"]
32211    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32212    #[doc = "Request to control this MAV."]
32213    #[doc = ""]
32214    #[doc = "ID: 5"]
32215    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32216    #[doc = "Accept / deny control of this MAV."]
32217    #[doc = ""]
32218    #[doc = "ID: 6"]
32219    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32220    #[doc = "Information about a potential collision."]
32221    #[doc = ""]
32222    #[doc = "ID: 247"]
32223    COLLISION(COLLISION_DATA),
32224    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32225    #[doc = ""]
32226    #[doc = "ID: 77"]
32227    COMMAND_ACK(COMMAND_ACK_DATA),
32228    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32229    #[doc = ""]
32230    #[doc = "ID: 80"]
32231    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32232    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32233    #[doc = ""]
32234    #[doc = "ID: 75"]
32235    COMMAND_INT(COMMAND_INT_DATA),
32236    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32237    #[doc = ""]
32238    #[doc = "ID: 76"]
32239    COMMAND_LONG(COMMAND_LONG_DATA),
32240    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
32241    #[doc = ""]
32242    #[doc = "ID: 395"]
32243    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32244    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32245    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
32246    #[doc = ""]
32247    #[doc = "ID: 396"]
32248    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32249    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
32250    #[doc = ""]
32251    #[doc = "ID: 397"]
32252    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32253    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
32254    #[doc = ""]
32255    #[doc = "ID: 146"]
32256    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32257    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
32258    #[doc = ""]
32259    #[doc = "ID: 411"]
32260    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32261    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
32262    #[doc = ""]
32263    #[doc = "ID: 436"]
32264    CURRENT_MODE(CURRENT_MODE_DATA),
32265    #[doc = "Data stream status information."]
32266    #[doc = ""]
32267    #[doc = "ID: 67"]
32268    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32269    DATA_STREAM(DATA_STREAM_DATA),
32270    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32271    #[doc = ""]
32272    #[doc = "ID: 130"]
32273    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32274    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
32275    #[doc = ""]
32276    #[doc = "ID: 254"]
32277    DEBUG(DEBUG_DATA),
32278    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
32279    #[doc = ""]
32280    #[doc = "ID: 350"]
32281    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32282    #[doc = "To debug something using a named 3D vector."]
32283    #[doc = ""]
32284    #[doc = "ID: 250"]
32285    DEBUG_VECT(DEBUG_VECT_DATA),
32286    #[doc = "Distance sensor information for an onboard rangefinder."]
32287    #[doc = ""]
32288    #[doc = "ID: 132"]
32289    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32290    #[doc = "EFI status output."]
32291    #[doc = ""]
32292    #[doc = "ID: 225"]
32293    EFI_STATUS(EFI_STATUS_DATA),
32294    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32295    #[doc = ""]
32296    #[doc = "ID: 131"]
32297    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32298    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
32299    #[doc = ""]
32300    #[doc = "ID: 290"]
32301    ESC_INFO(ESC_INFO_DATA),
32302    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
32303    #[doc = ""]
32304    #[doc = "ID: 291"]
32305    ESC_STATUS(ESC_STATUS_DATA),
32306    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
32307    #[doc = ""]
32308    #[doc = "ID: 230"]
32309    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32310    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32311    #[doc = ""]
32312    #[doc = "ID: 410"]
32313    EVENT(EVENT_DATA),
32314    #[doc = "Provides state for additional features."]
32315    #[doc = ""]
32316    #[doc = "ID: 245"]
32317    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32318    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
32319    #[doc = ""]
32320    #[doc = "ID: 162"]
32321    FENCE_STATUS(FENCE_STATUS_DATA),
32322    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
32323    #[doc = ""]
32324    #[doc = "ID: 110"]
32325    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32326    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
32327    #[doc = ""]
32328    #[doc = "ID: 264"]
32329    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32330    #[doc = "Current motion information from a designated system."]
32331    #[doc = ""]
32332    #[doc = "ID: 144"]
32333    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32334    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
32335    #[doc = ""]
32336    #[doc = "ID: 371"]
32337    FUEL_STATUS(FUEL_STATUS_DATA),
32338    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
32339    #[doc = ""]
32340    #[doc = "ID: 373"]
32341    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32342    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
32343    #[doc = ""]
32344    #[doc = "ID: 285"]
32345    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32346    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
32347    #[doc = ""]
32348    #[doc = "ID: 283"]
32349    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32350    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
32351    #[doc = ""]
32352    #[doc = "ID: 284"]
32353    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32354    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
32355    #[doc = ""]
32356    #[doc = "ID: 280"]
32357    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32358    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32359    #[doc = ""]
32360    #[doc = "ID: 282"]
32361    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32362    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32363    #[doc = ""]
32364    #[doc = "ID: 288"]
32365    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32366    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
32367    #[doc = ""]
32368    #[doc = "ID: 287"]
32369    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32370    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
32371    #[doc = ""]
32372    #[doc = "ID: 281"]
32373    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32374    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
32375    #[doc = ""]
32376    #[doc = "ID: 33"]
32377    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32378    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
32379    #[doc = ""]
32380    #[doc = "ID: 63"]
32381    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32382    #[doc = "Global position/attitude estimate from a vision source."]
32383    #[doc = ""]
32384    #[doc = "ID: 101"]
32385    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32386    #[doc = "Second GPS data."]
32387    #[doc = ""]
32388    #[doc = "ID: 124"]
32389    GPS2_RAW(GPS2_RAW_DATA),
32390    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32391    #[doc = ""]
32392    #[doc = "ID: 128"]
32393    GPS2_RTK(GPS2_RTK_DATA),
32394    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
32395    #[doc = ""]
32396    #[doc = "ID: 49"]
32397    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32398    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
32399    #[doc = ""]
32400    #[doc = "ID: 123"]
32401    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32402    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32403    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
32404    #[doc = ""]
32405    #[doc = "ID: 232"]
32406    GPS_INPUT(GPS_INPUT_DATA),
32407    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32408    #[doc = ""]
32409    #[doc = "ID: 24"]
32410    GPS_RAW_INT(GPS_RAW_INT_DATA),
32411    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
32412    #[doc = ""]
32413    #[doc = "ID: 233"]
32414    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32415    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32416    #[doc = ""]
32417    #[doc = "ID: 127"]
32418    GPS_RTK(GPS_RTK_DATA),
32419    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
32420    #[doc = ""]
32421    #[doc = "ID: 25"]
32422    GPS_STATUS(GPS_STATUS_DATA),
32423    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
32424    #[doc = ""]
32425    #[doc = "ID: 0"]
32426    HEARTBEAT(HEARTBEAT_DATA),
32427    #[doc = "The IMU readings in SI units in NED body frame."]
32428    #[doc = ""]
32429    #[doc = "ID: 105"]
32430    HIGHRES_IMU(HIGHRES_IMU_DATA),
32431    #[doc = "Message appropriate for high latency connections like Iridium."]
32432    #[doc = ""]
32433    #[doc = "ID: 234"]
32434    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32435    HIGH_LATENCY(HIGH_LATENCY_DATA),
32436    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
32437    #[doc = ""]
32438    #[doc = "ID: 235"]
32439    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32440    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
32441    #[doc = ""]
32442    #[doc = "ID: 93"]
32443    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32444    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
32445    #[doc = ""]
32446    #[doc = "ID: 91"]
32447    HIL_CONTROLS(HIL_CONTROLS_DATA),
32448    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32449    #[doc = ""]
32450    #[doc = "ID: 113"]
32451    HIL_GPS(HIL_GPS_DATA),
32452    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
32453    #[doc = ""]
32454    #[doc = "ID: 114"]
32455    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32456    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
32457    #[doc = ""]
32458    #[doc = "ID: 92"]
32459    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32460    #[doc = "The IMU readings in SI units in NED body frame."]
32461    #[doc = ""]
32462    #[doc = "ID: 107"]
32463    HIL_SENSOR(HIL_SENSOR_DATA),
32464    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32465    #[doc = ""]
32466    #[doc = "ID: 90"]
32467    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32468    HIL_STATE(HIL_STATE_DATA),
32469    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32470    #[doc = ""]
32471    #[doc = "ID: 115"]
32472    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32473    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
32474    #[doc = ""]
32475    #[doc = "ID: 242"]
32476    HOME_POSITION(HOME_POSITION_DATA),
32477    #[doc = "Temperature and humidity from hygrometer."]
32478    #[doc = ""]
32479    #[doc = "ID: 12920"]
32480    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
32481    #[doc = "Illuminator status."]
32482    #[doc = ""]
32483    #[doc = "ID: 440"]
32484    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
32485    #[doc = "Status of the Iridium SBD link."]
32486    #[doc = ""]
32487    #[doc = "ID: 335"]
32488    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
32489    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
32490    #[doc = ""]
32491    #[doc = "ID: 149"]
32492    LANDING_TARGET(LANDING_TARGET_DATA),
32493    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
32494    #[doc = ""]
32495    #[doc = "ID: 8"]
32496    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
32497    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32498    #[doc = ""]
32499    #[doc = "ID: 32"]
32500    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
32501    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32502    #[doc = ""]
32503    #[doc = "ID: 64"]
32504    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
32505    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32506    #[doc = ""]
32507    #[doc = "ID: 89"]
32508    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
32509    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
32510    #[doc = ""]
32511    #[doc = "ID: 268"]
32512    LOGGING_ACK(LOGGING_ACK_DATA),
32513    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
32514    #[doc = ""]
32515    #[doc = "ID: 266"]
32516    LOGGING_DATA(LOGGING_DATA_DATA),
32517    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
32518    #[doc = ""]
32519    #[doc = "ID: 267"]
32520    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
32521    #[doc = "Reply to LOG_REQUEST_DATA."]
32522    #[doc = ""]
32523    #[doc = "ID: 120"]
32524    LOG_DATA(LOG_DATA_DATA),
32525    #[doc = "Reply to LOG_REQUEST_LIST."]
32526    #[doc = ""]
32527    #[doc = "ID: 118"]
32528    LOG_ENTRY(LOG_ENTRY_DATA),
32529    #[doc = "Erase all logs."]
32530    #[doc = ""]
32531    #[doc = "ID: 121"]
32532    LOG_ERASE(LOG_ERASE_DATA),
32533    #[doc = "Request a chunk of a log."]
32534    #[doc = ""]
32535    #[doc = "ID: 119"]
32536    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
32537    #[doc = "Stop log transfer and resume normal logging."]
32538    #[doc = ""]
32539    #[doc = "ID: 122"]
32540    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
32541    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
32542    #[doc = ""]
32543    #[doc = "ID: 117"]
32544    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
32545    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
32546    #[doc = ""]
32547    #[doc = "ID: 192"]
32548    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
32549    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
32550    #[doc = ""]
32551    #[doc = "ID: 69"]
32552    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
32553    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
32554    #[doc = ""]
32555    #[doc = "ID: 81"]
32556    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
32557    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32558    #[doc = ""]
32559    #[doc = "ID: 249"]
32560    MEMORY_VECT(MEMORY_VECT_DATA),
32561    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
32562    #[doc = ""]
32563    #[doc = "ID: 244"]
32564    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
32565    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
32566    #[doc = ""]
32567    #[doc = "ID: 47"]
32568    MISSION_ACK(MISSION_ACK_DATA),
32569    #[doc = "Delete all mission items at once."]
32570    #[doc = ""]
32571    #[doc = "ID: 45"]
32572    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
32573    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
32574    #[doc = ""]
32575    #[doc = "ID: 44"]
32576    MISSION_COUNT(MISSION_COUNT_DATA),
32577    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
32578    #[doc = ""]
32579    #[doc = "ID: 42"]
32580    MISSION_CURRENT(MISSION_CURRENT_DATA),
32581    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32582    #[doc = ""]
32583    #[doc = "ID: 39"]
32584    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
32585    MISSION_ITEM(MISSION_ITEM_DATA),
32586    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32587    #[doc = ""]
32588    #[doc = "ID: 73"]
32589    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
32590    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
32591    #[doc = ""]
32592    #[doc = "ID: 46"]
32593    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
32594    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
32595    #[doc = ""]
32596    #[doc = "ID: 40"]
32597    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
32598    MISSION_REQUEST(MISSION_REQUEST_DATA),
32599    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
32600    #[doc = ""]
32601    #[doc = "ID: 51"]
32602    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
32603    #[doc = "Request the overall list of mission items from the system/component."]
32604    #[doc = ""]
32605    #[doc = "ID: 43"]
32606    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
32607    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
32608    #[doc = ""]
32609    #[doc = "ID: 37"]
32610    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
32611    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
32612    #[doc = ""]
32613    #[doc = "ID: 41"]
32614    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
32615    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
32616    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
32617    #[doc = ""]
32618    #[doc = "ID: 38"]
32619    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
32620    #[doc = "Orientation of a mount."]
32621    #[doc = ""]
32622    #[doc = "ID: 265"]
32623    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
32624    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
32625    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32626    #[doc = ""]
32627    #[doc = "ID: 251"]
32628    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
32629    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32630    #[doc = ""]
32631    #[doc = "ID: 252"]
32632    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
32633    #[doc = "The state of the navigation and position controller."]
32634    #[doc = ""]
32635    #[doc = "ID: 62"]
32636    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
32637    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
32638    #[doc = ""]
32639    #[doc = "ID: 330"]
32640    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
32641    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
32642    #[doc = ""]
32643    #[doc = "ID: 331"]
32644    ODOMETRY(ODOMETRY_DATA),
32645    #[doc = "Hardware status sent by an onboard computer."]
32646    #[doc = ""]
32647    #[doc = "ID: 390"]
32648    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
32649    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
32650    #[doc = ""]
32651    #[doc = "ID: 12918"]
32652    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
32653    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
32654    #[doc = ""]
32655    #[doc = "ID: 12902"]
32656    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
32657    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
32658    #[doc = ""]
32659    #[doc = "ID: 12900"]
32660    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
32661    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
32662    #[doc = ""]
32663    #[doc = "ID: 12901"]
32664    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
32665    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
32666    #[doc = ""]
32667    #[doc = "ID: 12915"]
32668    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
32669    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
32670    #[doc = ""]
32671    #[doc = "ID: 12905"]
32672    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
32673    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
32674    #[doc = ""]
32675    #[doc = "ID: 12903"]
32676    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
32677    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
32678    #[doc = ""]
32679    #[doc = "ID: 12904"]
32680    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
32681    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
32682    #[doc = ""]
32683    #[doc = "ID: 12919"]
32684    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
32685    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
32686    #[doc = ""]
32687    #[doc = "ID: 100"]
32688    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
32689    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
32690    #[doc = ""]
32691    #[doc = "ID: 106"]
32692    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
32693    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
32694    #[doc = ""]
32695    #[doc = "ID: 360"]
32696    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
32697    #[doc = "Response from a PARAM_EXT_SET message."]
32698    #[doc = ""]
32699    #[doc = "ID: 324"]
32700    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
32701    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
32702    #[doc = ""]
32703    #[doc = "ID: 321"]
32704    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
32705    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
32706    #[doc = ""]
32707    #[doc = "ID: 320"]
32708    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
32709    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
32710    #[doc = ""]
32711    #[doc = "ID: 323"]
32712    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
32713    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
32714    #[doc = ""]
32715    #[doc = "ID: 322"]
32716    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
32717    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
32718    #[doc = ""]
32719    #[doc = "ID: 50"]
32720    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
32721    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
32722    #[doc = ""]
32723    #[doc = "ID: 21"]
32724    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
32725    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
32726    #[doc = ""]
32727    #[doc = "ID: 20"]
32728    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
32729    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
32730    #[doc = ""]
32731    #[doc = "ID: 23"]
32732    PARAM_SET(PARAM_SET_DATA),
32733    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
32734    #[doc = ""]
32735    #[doc = "ID: 22"]
32736    PARAM_VALUE(PARAM_VALUE_DATA),
32737    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
32738    #[doc = ""]
32739    #[doc = "ID: 4"]
32740    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
32741    PING(PING_DATA),
32742    #[doc = "Control vehicle tone generation (buzzer)."]
32743    #[doc = ""]
32744    #[doc = "ID: 258"]
32745    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
32746    PLAY_TUNE(PLAY_TUNE_DATA),
32747    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
32748    #[doc = ""]
32749    #[doc = "ID: 400"]
32750    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
32751    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
32752    #[doc = ""]
32753    #[doc = "ID: 87"]
32754    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
32755    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
32756    #[doc = ""]
32757    #[doc = "ID: 85"]
32758    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
32759    #[doc = "Power supply status."]
32760    #[doc = ""]
32761    #[doc = "ID: 125"]
32762    POWER_STATUS(POWER_STATUS_DATA),
32763    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
32764    #[doc = ""]
32765    #[doc = "ID: 300"]
32766    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
32767    #[doc = "Status generated by radio and injected into MAVLink stream."]
32768    #[doc = ""]
32769    #[doc = "ID: 109"]
32770    RADIO_STATUS(RADIO_STATUS_DATA),
32771    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
32772    #[doc = ""]
32773    #[doc = "ID: 27"]
32774    RAW_IMU(RAW_IMU_DATA),
32775    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
32776    #[doc = ""]
32777    #[doc = "ID: 28"]
32778    RAW_PRESSURE(RAW_PRESSURE_DATA),
32779    #[doc = "RPM sensor data message."]
32780    #[doc = ""]
32781    #[doc = "ID: 339"]
32782    RAW_RPM(RAW_RPM_DATA),
32783    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
32784    #[doc = ""]
32785    #[doc = "ID: 65"]
32786    RC_CHANNELS(RC_CHANNELS_DATA),
32787    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
32788    #[doc = ""]
32789    #[doc = "ID: 70"]
32790    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
32791    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
32792    #[doc = ""]
32793    #[doc = "ID: 35"]
32794    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
32795    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
32796    #[doc = ""]
32797    #[doc = "ID: 34"]
32798    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
32799    #[doc = "Request a data stream."]
32800    #[doc = ""]
32801    #[doc = "ID: 66"]
32802    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
32803    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
32804    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
32805    #[doc = ""]
32806    #[doc = "ID: 412"]
32807    REQUEST_EVENT(REQUEST_EVENT_DATA),
32808    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
32809    #[doc = ""]
32810    #[doc = "ID: 142"]
32811    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
32812    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
32813    #[doc = ""]
32814    #[doc = "ID: 413"]
32815    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
32816    #[doc = "Read out the safety zone the MAV currently assumes."]
32817    #[doc = ""]
32818    #[doc = "ID: 55"]
32819    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
32820    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
32821    #[doc = ""]
32822    #[doc = "ID: 54"]
32823    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
32824    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
32825    #[doc = ""]
32826    #[doc = "ID: 26"]
32827    SCALED_IMU(SCALED_IMU_DATA),
32828    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
32829    #[doc = ""]
32830    #[doc = "ID: 116"]
32831    SCALED_IMU2(SCALED_IMU2_DATA),
32832    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
32833    #[doc = ""]
32834    #[doc = "ID: 129"]
32835    SCALED_IMU3(SCALED_IMU3_DATA),
32836    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
32837    #[doc = ""]
32838    #[doc = "ID: 29"]
32839    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
32840    #[doc = "Barometer readings for 2nd barometer."]
32841    #[doc = ""]
32842    #[doc = "ID: 137"]
32843    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
32844    #[doc = "Barometer readings for 3rd barometer."]
32845    #[doc = ""]
32846    #[doc = "ID: 143"]
32847    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
32848    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
32849    #[doc = ""]
32850    #[doc = "ID: 126"]
32851    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
32852    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
32853    #[doc = ""]
32854    #[doc = "ID: 36"]
32855    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
32856    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
32857    #[doc = ""]
32858    #[doc = "ID: 256"]
32859    SETUP_SIGNING(SETUP_SIGNING_DATA),
32860    #[doc = "Set the vehicle attitude and body angular rates."]
32861    #[doc = ""]
32862    #[doc = "ID: 139"]
32863    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
32864    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
32865    #[doc = ""]
32866    #[doc = "ID: 82"]
32867    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
32868    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
32869    #[doc = ""]
32870    #[doc = "ID: 48"]
32871    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
32872    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
32873    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
32874    #[doc = ""]
32875    #[doc = "ID: 243"]
32876    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
32877    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
32878    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
32879    #[doc = ""]
32880    #[doc = "ID: 11"]
32881    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
32882    SET_MODE(SET_MODE_DATA),
32883    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
32884    #[doc = ""]
32885    #[doc = "ID: 86"]
32886    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
32887    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
32888    #[doc = ""]
32889    #[doc = "ID: 84"]
32890    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
32891    #[doc = "Status of simulation environment, if used."]
32892    #[doc = ""]
32893    #[doc = "ID: 108"]
32894    SIM_STATE(SIM_STATE_DATA),
32895    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
32896    #[doc = ""]
32897    #[doc = "ID: 370"]
32898    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
32899    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
32900    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
32901    #[doc = ""]
32902    #[doc = "ID: 253"]
32903    STATUSTEXT(STATUSTEXT_DATA),
32904    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
32905    #[doc = ""]
32906    #[doc = "ID: 261"]
32907    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
32908    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
32909    #[doc = ""]
32910    #[doc = "ID: 401"]
32911    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
32912    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
32913    #[doc = ""]
32914    #[doc = "ID: 2"]
32915    SYSTEM_TIME(SYSTEM_TIME_DATA),
32916    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
32917    #[doc = ""]
32918    #[doc = "ID: 1"]
32919    SYS_STATUS(SYS_STATUS_DATA),
32920    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
32921    #[doc = ""]
32922    #[doc = "ID: 135"]
32923    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
32924    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
32925    #[doc = ""]
32926    #[doc = "ID: 134"]
32927    TERRAIN_DATA(TERRAIN_DATA_DATA),
32928    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
32929    #[doc = ""]
32930    #[doc = "ID: 136"]
32931    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
32932    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
32933    #[doc = ""]
32934    #[doc = "ID: 133"]
32935    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
32936    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
32937    #[doc = ""]
32938    #[doc = "ID: 111"]
32939    TIMESYNC(TIMESYNC_DATA),
32940    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
32941    #[doc = ""]
32942    #[doc = "ID: 380"]
32943    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
32944    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
32945    #[doc = ""]
32946    #[doc = "ID: 333"]
32947    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
32948    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
32949    #[doc = ""]
32950    #[doc = "ID: 332"]
32951    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
32952    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
32953    #[doc = ""]
32954    #[doc = "ID: 385"]
32955    TUNNEL(TUNNEL_DATA),
32956    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
32957    #[doc = ""]
32958    #[doc = "ID: 311"]
32959    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
32960    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
32961    #[doc = ""]
32962    #[doc = "ID: 310"]
32963    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
32964    #[doc = "The global position resulting from GPS and sensor fusion."]
32965    #[doc = ""]
32966    #[doc = "ID: 340"]
32967    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
32968    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
32969    #[doc = ""]
32970    #[doc = "ID: 248"]
32971    V2_EXTENSION(V2_EXTENSION_DATA),
32972    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
32973    #[doc = ""]
32974    #[doc = "ID: 74"]
32975    VFR_HUD(VFR_HUD_DATA),
32976    #[doc = "Vibration levels and accelerometer clipping."]
32977    #[doc = ""]
32978    #[doc = "ID: 241"]
32979    VIBRATION(VIBRATION_DATA),
32980    #[doc = "Global position estimate from a Vicon motion system source."]
32981    #[doc = ""]
32982    #[doc = "ID: 104"]
32983    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
32984    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
32985    #[doc = ""]
32986    #[doc = "ID: 269"]
32987    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
32988    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
32989    #[doc = ""]
32990    #[doc = "ID: 270"]
32991    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
32992    #[doc = "Local position/attitude estimate from a vision source."]
32993    #[doc = ""]
32994    #[doc = "ID: 102"]
32995    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
32996    #[doc = "Speed estimate from a vision source."]
32997    #[doc = ""]
32998    #[doc = "ID: 103"]
32999    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33000    #[doc = "Cumulative distance traveled for each reported wheel."]
33001    #[doc = ""]
33002    #[doc = "ID: 9000"]
33003    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33004    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33005    #[doc = ""]
33006    #[doc = "ID: 299"]
33007    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33008    #[doc = "Winch status."]
33009    #[doc = ""]
33010    #[doc = "ID: 9005"]
33011    WINCH_STATUS(WINCH_STATUS_DATA),
33012    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33013    #[doc = ""]
33014    #[doc = "ID: 231"]
33015    WIND_COV(WIND_COV_DATA),
33016}
33017impl MavMessage {
33018    pub const fn all_ids() -> &'static [u32] {
33019        &[
33020            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33021            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33022            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33023            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33024            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33025            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33026            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33027            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33028            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33029            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33030            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
33031            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
33032            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
33033            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
33034            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
33035            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
33036            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
33037            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
33038            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
33039            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
33040            12915u32, 12918u32, 12919u32, 12920u32,
33041        ]
33042    }
33043    pub const fn all_messages() -> &'static [(&'static str, u32)] {
33044        &[
33045            (HEARTBEAT_DATA::NAME, HEARTBEAT_DATA::ID),
33046            (SYS_STATUS_DATA::NAME, SYS_STATUS_DATA::ID),
33047            (SYSTEM_TIME_DATA::NAME, SYSTEM_TIME_DATA::ID),
33048            (PING_DATA::NAME, PING_DATA::ID),
33049            (
33050                CHANGE_OPERATOR_CONTROL_DATA::NAME,
33051                CHANGE_OPERATOR_CONTROL_DATA::ID,
33052            ),
33053            (
33054                CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
33055                CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
33056            ),
33057            (AUTH_KEY_DATA::NAME, AUTH_KEY_DATA::ID),
33058            (LINK_NODE_STATUS_DATA::NAME, LINK_NODE_STATUS_DATA::ID),
33059            (SET_MODE_DATA::NAME, SET_MODE_DATA::ID),
33060            (PARAM_REQUEST_READ_DATA::NAME, PARAM_REQUEST_READ_DATA::ID),
33061            (PARAM_REQUEST_LIST_DATA::NAME, PARAM_REQUEST_LIST_DATA::ID),
33062            (PARAM_VALUE_DATA::NAME, PARAM_VALUE_DATA::ID),
33063            (PARAM_SET_DATA::NAME, PARAM_SET_DATA::ID),
33064            (GPS_RAW_INT_DATA::NAME, GPS_RAW_INT_DATA::ID),
33065            (GPS_STATUS_DATA::NAME, GPS_STATUS_DATA::ID),
33066            (SCALED_IMU_DATA::NAME, SCALED_IMU_DATA::ID),
33067            (RAW_IMU_DATA::NAME, RAW_IMU_DATA::ID),
33068            (RAW_PRESSURE_DATA::NAME, RAW_PRESSURE_DATA::ID),
33069            (SCALED_PRESSURE_DATA::NAME, SCALED_PRESSURE_DATA::ID),
33070            (ATTITUDE_DATA::NAME, ATTITUDE_DATA::ID),
33071            (ATTITUDE_QUATERNION_DATA::NAME, ATTITUDE_QUATERNION_DATA::ID),
33072            (LOCAL_POSITION_NED_DATA::NAME, LOCAL_POSITION_NED_DATA::ID),
33073            (GLOBAL_POSITION_INT_DATA::NAME, GLOBAL_POSITION_INT_DATA::ID),
33074            (RC_CHANNELS_SCALED_DATA::NAME, RC_CHANNELS_SCALED_DATA::ID),
33075            (RC_CHANNELS_RAW_DATA::NAME, RC_CHANNELS_RAW_DATA::ID),
33076            (SERVO_OUTPUT_RAW_DATA::NAME, SERVO_OUTPUT_RAW_DATA::ID),
33077            (
33078                MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
33079                MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
33080            ),
33081            (
33082                MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
33083                MISSION_WRITE_PARTIAL_LIST_DATA::ID,
33084            ),
33085            (MISSION_ITEM_DATA::NAME, MISSION_ITEM_DATA::ID),
33086            (MISSION_REQUEST_DATA::NAME, MISSION_REQUEST_DATA::ID),
33087            (MISSION_SET_CURRENT_DATA::NAME, MISSION_SET_CURRENT_DATA::ID),
33088            (MISSION_CURRENT_DATA::NAME, MISSION_CURRENT_DATA::ID),
33089            (
33090                MISSION_REQUEST_LIST_DATA::NAME,
33091                MISSION_REQUEST_LIST_DATA::ID,
33092            ),
33093            (MISSION_COUNT_DATA::NAME, MISSION_COUNT_DATA::ID),
33094            (MISSION_CLEAR_ALL_DATA::NAME, MISSION_CLEAR_ALL_DATA::ID),
33095            (
33096                MISSION_ITEM_REACHED_DATA::NAME,
33097                MISSION_ITEM_REACHED_DATA::ID,
33098            ),
33099            (MISSION_ACK_DATA::NAME, MISSION_ACK_DATA::ID),
33100            (
33101                SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
33102                SET_GPS_GLOBAL_ORIGIN_DATA::ID,
33103            ),
33104            (GPS_GLOBAL_ORIGIN_DATA::NAME, GPS_GLOBAL_ORIGIN_DATA::ID),
33105            (PARAM_MAP_RC_DATA::NAME, PARAM_MAP_RC_DATA::ID),
33106            (MISSION_REQUEST_INT_DATA::NAME, MISSION_REQUEST_INT_DATA::ID),
33107            (
33108                SAFETY_SET_ALLOWED_AREA_DATA::NAME,
33109                SAFETY_SET_ALLOWED_AREA_DATA::ID,
33110            ),
33111            (SAFETY_ALLOWED_AREA_DATA::NAME, SAFETY_ALLOWED_AREA_DATA::ID),
33112            (
33113                ATTITUDE_QUATERNION_COV_DATA::NAME,
33114                ATTITUDE_QUATERNION_COV_DATA::ID,
33115            ),
33116            (
33117                NAV_CONTROLLER_OUTPUT_DATA::NAME,
33118                NAV_CONTROLLER_OUTPUT_DATA::ID,
33119            ),
33120            (
33121                GLOBAL_POSITION_INT_COV_DATA::NAME,
33122                GLOBAL_POSITION_INT_COV_DATA::ID,
33123            ),
33124            (
33125                LOCAL_POSITION_NED_COV_DATA::NAME,
33126                LOCAL_POSITION_NED_COV_DATA::ID,
33127            ),
33128            (RC_CHANNELS_DATA::NAME, RC_CHANNELS_DATA::ID),
33129            (REQUEST_DATA_STREAM_DATA::NAME, REQUEST_DATA_STREAM_DATA::ID),
33130            (DATA_STREAM_DATA::NAME, DATA_STREAM_DATA::ID),
33131            (MANUAL_CONTROL_DATA::NAME, MANUAL_CONTROL_DATA::ID),
33132            (
33133                RC_CHANNELS_OVERRIDE_DATA::NAME,
33134                RC_CHANNELS_OVERRIDE_DATA::ID,
33135            ),
33136            (MISSION_ITEM_INT_DATA::NAME, MISSION_ITEM_INT_DATA::ID),
33137            (VFR_HUD_DATA::NAME, VFR_HUD_DATA::ID),
33138            (COMMAND_INT_DATA::NAME, COMMAND_INT_DATA::ID),
33139            (COMMAND_LONG_DATA::NAME, COMMAND_LONG_DATA::ID),
33140            (COMMAND_ACK_DATA::NAME, COMMAND_ACK_DATA::ID),
33141            (COMMAND_CANCEL_DATA::NAME, COMMAND_CANCEL_DATA::ID),
33142            (MANUAL_SETPOINT_DATA::NAME, MANUAL_SETPOINT_DATA::ID),
33143            (SET_ATTITUDE_TARGET_DATA::NAME, SET_ATTITUDE_TARGET_DATA::ID),
33144            (ATTITUDE_TARGET_DATA::NAME, ATTITUDE_TARGET_DATA::ID),
33145            (
33146                SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
33147                SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
33148            ),
33149            (
33150                POSITION_TARGET_LOCAL_NED_DATA::NAME,
33151                POSITION_TARGET_LOCAL_NED_DATA::ID,
33152            ),
33153            (
33154                SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
33155                SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
33156            ),
33157            (
33158                POSITION_TARGET_GLOBAL_INT_DATA::NAME,
33159                POSITION_TARGET_GLOBAL_INT_DATA::ID,
33160            ),
33161            (
33162                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME,
33163                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID,
33164            ),
33165            (HIL_STATE_DATA::NAME, HIL_STATE_DATA::ID),
33166            (HIL_CONTROLS_DATA::NAME, HIL_CONTROLS_DATA::ID),
33167            (HIL_RC_INPUTS_RAW_DATA::NAME, HIL_RC_INPUTS_RAW_DATA::ID),
33168            (
33169                HIL_ACTUATOR_CONTROLS_DATA::NAME,
33170                HIL_ACTUATOR_CONTROLS_DATA::ID,
33171            ),
33172            (OPTICAL_FLOW_DATA::NAME, OPTICAL_FLOW_DATA::ID),
33173            (
33174                GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
33175                GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
33176            ),
33177            (
33178                VISION_POSITION_ESTIMATE_DATA::NAME,
33179                VISION_POSITION_ESTIMATE_DATA::ID,
33180            ),
33181            (
33182                VISION_SPEED_ESTIMATE_DATA::NAME,
33183                VISION_SPEED_ESTIMATE_DATA::ID,
33184            ),
33185            (
33186                VICON_POSITION_ESTIMATE_DATA::NAME,
33187                VICON_POSITION_ESTIMATE_DATA::ID,
33188            ),
33189            (HIGHRES_IMU_DATA::NAME, HIGHRES_IMU_DATA::ID),
33190            (OPTICAL_FLOW_RAD_DATA::NAME, OPTICAL_FLOW_RAD_DATA::ID),
33191            (HIL_SENSOR_DATA::NAME, HIL_SENSOR_DATA::ID),
33192            (SIM_STATE_DATA::NAME, SIM_STATE_DATA::ID),
33193            (RADIO_STATUS_DATA::NAME, RADIO_STATUS_DATA::ID),
33194            (
33195                FILE_TRANSFER_PROTOCOL_DATA::NAME,
33196                FILE_TRANSFER_PROTOCOL_DATA::ID,
33197            ),
33198            (TIMESYNC_DATA::NAME, TIMESYNC_DATA::ID),
33199            (CAMERA_TRIGGER_DATA::NAME, CAMERA_TRIGGER_DATA::ID),
33200            (HIL_GPS_DATA::NAME, HIL_GPS_DATA::ID),
33201            (HIL_OPTICAL_FLOW_DATA::NAME, HIL_OPTICAL_FLOW_DATA::ID),
33202            (
33203                HIL_STATE_QUATERNION_DATA::NAME,
33204                HIL_STATE_QUATERNION_DATA::ID,
33205            ),
33206            (SCALED_IMU2_DATA::NAME, SCALED_IMU2_DATA::ID),
33207            (LOG_REQUEST_LIST_DATA::NAME, LOG_REQUEST_LIST_DATA::ID),
33208            (LOG_ENTRY_DATA::NAME, LOG_ENTRY_DATA::ID),
33209            (LOG_REQUEST_DATA_DATA::NAME, LOG_REQUEST_DATA_DATA::ID),
33210            (LOG_DATA_DATA::NAME, LOG_DATA_DATA::ID),
33211            (LOG_ERASE_DATA::NAME, LOG_ERASE_DATA::ID),
33212            (LOG_REQUEST_END_DATA::NAME, LOG_REQUEST_END_DATA::ID),
33213            (GPS_INJECT_DATA_DATA::NAME, GPS_INJECT_DATA_DATA::ID),
33214            (GPS2_RAW_DATA::NAME, GPS2_RAW_DATA::ID),
33215            (POWER_STATUS_DATA::NAME, POWER_STATUS_DATA::ID),
33216            (SERIAL_CONTROL_DATA::NAME, SERIAL_CONTROL_DATA::ID),
33217            (GPS_RTK_DATA::NAME, GPS_RTK_DATA::ID),
33218            (GPS2_RTK_DATA::NAME, GPS2_RTK_DATA::ID),
33219            (SCALED_IMU3_DATA::NAME, SCALED_IMU3_DATA::ID),
33220            (
33221                DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
33222                DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
33223            ),
33224            (ENCAPSULATED_DATA_DATA::NAME, ENCAPSULATED_DATA_DATA::ID),
33225            (DISTANCE_SENSOR_DATA::NAME, DISTANCE_SENSOR_DATA::ID),
33226            (TERRAIN_REQUEST_DATA::NAME, TERRAIN_REQUEST_DATA::ID),
33227            (TERRAIN_DATA_DATA::NAME, TERRAIN_DATA_DATA::ID),
33228            (TERRAIN_CHECK_DATA::NAME, TERRAIN_CHECK_DATA::ID),
33229            (TERRAIN_REPORT_DATA::NAME, TERRAIN_REPORT_DATA::ID),
33230            (SCALED_PRESSURE2_DATA::NAME, SCALED_PRESSURE2_DATA::ID),
33231            (ATT_POS_MOCAP_DATA::NAME, ATT_POS_MOCAP_DATA::ID),
33232            (
33233                SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
33234                SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
33235            ),
33236            (
33237                ACTUATOR_CONTROL_TARGET_DATA::NAME,
33238                ACTUATOR_CONTROL_TARGET_DATA::ID,
33239            ),
33240            (ALTITUDE_DATA::NAME, ALTITUDE_DATA::ID),
33241            (RESOURCE_REQUEST_DATA::NAME, RESOURCE_REQUEST_DATA::ID),
33242            (SCALED_PRESSURE3_DATA::NAME, SCALED_PRESSURE3_DATA::ID),
33243            (FOLLOW_TARGET_DATA::NAME, FOLLOW_TARGET_DATA::ID),
33244            (
33245                CONTROL_SYSTEM_STATE_DATA::NAME,
33246                CONTROL_SYSTEM_STATE_DATA::ID,
33247            ),
33248            (BATTERY_STATUS_DATA::NAME, BATTERY_STATUS_DATA::ID),
33249            (AUTOPILOT_VERSION_DATA::NAME, AUTOPILOT_VERSION_DATA::ID),
33250            (LANDING_TARGET_DATA::NAME, LANDING_TARGET_DATA::ID),
33251            (FENCE_STATUS_DATA::NAME, FENCE_STATUS_DATA::ID),
33252            (MAG_CAL_REPORT_DATA::NAME, MAG_CAL_REPORT_DATA::ID),
33253            (EFI_STATUS_DATA::NAME, EFI_STATUS_DATA::ID),
33254            (ESTIMATOR_STATUS_DATA::NAME, ESTIMATOR_STATUS_DATA::ID),
33255            (WIND_COV_DATA::NAME, WIND_COV_DATA::ID),
33256            (GPS_INPUT_DATA::NAME, GPS_INPUT_DATA::ID),
33257            (GPS_RTCM_DATA_DATA::NAME, GPS_RTCM_DATA_DATA::ID),
33258            (HIGH_LATENCY_DATA::NAME, HIGH_LATENCY_DATA::ID),
33259            (HIGH_LATENCY2_DATA::NAME, HIGH_LATENCY2_DATA::ID),
33260            (VIBRATION_DATA::NAME, VIBRATION_DATA::ID),
33261            (HOME_POSITION_DATA::NAME, HOME_POSITION_DATA::ID),
33262            (SET_HOME_POSITION_DATA::NAME, SET_HOME_POSITION_DATA::ID),
33263            (MESSAGE_INTERVAL_DATA::NAME, MESSAGE_INTERVAL_DATA::ID),
33264            (EXTENDED_SYS_STATE_DATA::NAME, EXTENDED_SYS_STATE_DATA::ID),
33265            (ADSB_VEHICLE_DATA::NAME, ADSB_VEHICLE_DATA::ID),
33266            (COLLISION_DATA::NAME, COLLISION_DATA::ID),
33267            (V2_EXTENSION_DATA::NAME, V2_EXTENSION_DATA::ID),
33268            (MEMORY_VECT_DATA::NAME, MEMORY_VECT_DATA::ID),
33269            (DEBUG_VECT_DATA::NAME, DEBUG_VECT_DATA::ID),
33270            (NAMED_VALUE_FLOAT_DATA::NAME, NAMED_VALUE_FLOAT_DATA::ID),
33271            (NAMED_VALUE_INT_DATA::NAME, NAMED_VALUE_INT_DATA::ID),
33272            (STATUSTEXT_DATA::NAME, STATUSTEXT_DATA::ID),
33273            (DEBUG_DATA::NAME, DEBUG_DATA::ID),
33274            (SETUP_SIGNING_DATA::NAME, SETUP_SIGNING_DATA::ID),
33275            (BUTTON_CHANGE_DATA::NAME, BUTTON_CHANGE_DATA::ID),
33276            (PLAY_TUNE_DATA::NAME, PLAY_TUNE_DATA::ID),
33277            (CAMERA_INFORMATION_DATA::NAME, CAMERA_INFORMATION_DATA::ID),
33278            (CAMERA_SETTINGS_DATA::NAME, CAMERA_SETTINGS_DATA::ID),
33279            (STORAGE_INFORMATION_DATA::NAME, STORAGE_INFORMATION_DATA::ID),
33280            (
33281                CAMERA_CAPTURE_STATUS_DATA::NAME,
33282                CAMERA_CAPTURE_STATUS_DATA::ID,
33283            ),
33284            (
33285                CAMERA_IMAGE_CAPTURED_DATA::NAME,
33286                CAMERA_IMAGE_CAPTURED_DATA::ID,
33287            ),
33288            (FLIGHT_INFORMATION_DATA::NAME, FLIGHT_INFORMATION_DATA::ID),
33289            (MOUNT_ORIENTATION_DATA::NAME, MOUNT_ORIENTATION_DATA::ID),
33290            (LOGGING_DATA_DATA::NAME, LOGGING_DATA_DATA::ID),
33291            (LOGGING_DATA_ACKED_DATA::NAME, LOGGING_DATA_ACKED_DATA::ID),
33292            (LOGGING_ACK_DATA::NAME, LOGGING_ACK_DATA::ID),
33293            (
33294                VIDEO_STREAM_INFORMATION_DATA::NAME,
33295                VIDEO_STREAM_INFORMATION_DATA::ID,
33296            ),
33297            (VIDEO_STREAM_STATUS_DATA::NAME, VIDEO_STREAM_STATUS_DATA::ID),
33298            (CAMERA_FOV_STATUS_DATA::NAME, CAMERA_FOV_STATUS_DATA::ID),
33299            (
33300                CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
33301                CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
33302            ),
33303            (
33304                CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
33305                CAMERA_TRACKING_GEO_STATUS_DATA::ID,
33306            ),
33307            (
33308                CAMERA_THERMAL_RANGE_DATA::NAME,
33309                CAMERA_THERMAL_RANGE_DATA::ID,
33310            ),
33311            (
33312                GIMBAL_MANAGER_INFORMATION_DATA::NAME,
33313                GIMBAL_MANAGER_INFORMATION_DATA::ID,
33314            ),
33315            (
33316                GIMBAL_MANAGER_STATUS_DATA::NAME,
33317                GIMBAL_MANAGER_STATUS_DATA::ID,
33318            ),
33319            (
33320                GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
33321                GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
33322            ),
33323            (
33324                GIMBAL_DEVICE_INFORMATION_DATA::NAME,
33325                GIMBAL_DEVICE_INFORMATION_DATA::ID,
33326            ),
33327            (
33328                GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
33329                GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
33330            ),
33331            (
33332                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
33333                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
33334            ),
33335            (
33336                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME,
33337                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID,
33338            ),
33339            (
33340                GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
33341                GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
33342            ),
33343            (
33344                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME,
33345                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID,
33346            ),
33347            (ESC_INFO_DATA::NAME, ESC_INFO_DATA::ID),
33348            (ESC_STATUS_DATA::NAME, ESC_STATUS_DATA::ID),
33349            (WIFI_CONFIG_AP_DATA::NAME, WIFI_CONFIG_AP_DATA::ID),
33350            (PROTOCOL_VERSION_DATA::NAME, PROTOCOL_VERSION_DATA::ID),
33351            (AIS_VESSEL_DATA::NAME, AIS_VESSEL_DATA::ID),
33352            (UAVCAN_NODE_STATUS_DATA::NAME, UAVCAN_NODE_STATUS_DATA::ID),
33353            (UAVCAN_NODE_INFO_DATA::NAME, UAVCAN_NODE_INFO_DATA::ID),
33354            (
33355                PARAM_EXT_REQUEST_READ_DATA::NAME,
33356                PARAM_EXT_REQUEST_READ_DATA::ID,
33357            ),
33358            (
33359                PARAM_EXT_REQUEST_LIST_DATA::NAME,
33360                PARAM_EXT_REQUEST_LIST_DATA::ID,
33361            ),
33362            (PARAM_EXT_VALUE_DATA::NAME, PARAM_EXT_VALUE_DATA::ID),
33363            (PARAM_EXT_SET_DATA::NAME, PARAM_EXT_SET_DATA::ID),
33364            (PARAM_EXT_ACK_DATA::NAME, PARAM_EXT_ACK_DATA::ID),
33365            (OBSTACLE_DISTANCE_DATA::NAME, OBSTACLE_DISTANCE_DATA::ID),
33366            (ODOMETRY_DATA::NAME, ODOMETRY_DATA::ID),
33367            (
33368                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME,
33369                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID,
33370            ),
33371            (
33372                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME,
33373                TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
33374            ),
33375            (CELLULAR_STATUS_DATA::NAME, CELLULAR_STATUS_DATA::ID),
33376            (ISBD_LINK_STATUS_DATA::NAME, ISBD_LINK_STATUS_DATA::ID),
33377            (CELLULAR_CONFIG_DATA::NAME, CELLULAR_CONFIG_DATA::ID),
33378            (RAW_RPM_DATA::NAME, RAW_RPM_DATA::ID),
33379            (UTM_GLOBAL_POSITION_DATA::NAME, UTM_GLOBAL_POSITION_DATA::ID),
33380            (DEBUG_FLOAT_ARRAY_DATA::NAME, DEBUG_FLOAT_ARRAY_DATA::ID),
33381            (
33382                ORBIT_EXECUTION_STATUS_DATA::NAME,
33383                ORBIT_EXECUTION_STATUS_DATA::ID,
33384            ),
33385            (SMART_BATTERY_INFO_DATA::NAME, SMART_BATTERY_INFO_DATA::ID),
33386            (FUEL_STATUS_DATA::NAME, FUEL_STATUS_DATA::ID),
33387            (BATTERY_INFO_DATA::NAME, BATTERY_INFO_DATA::ID),
33388            (GENERATOR_STATUS_DATA::NAME, GENERATOR_STATUS_DATA::ID),
33389            (
33390                ACTUATOR_OUTPUT_STATUS_DATA::NAME,
33391                ACTUATOR_OUTPUT_STATUS_DATA::ID,
33392            ),
33393            (
33394                TIME_ESTIMATE_TO_TARGET_DATA::NAME,
33395                TIME_ESTIMATE_TO_TARGET_DATA::ID,
33396            ),
33397            (TUNNEL_DATA::NAME, TUNNEL_DATA::ID),
33398            (CAN_FRAME_DATA::NAME, CAN_FRAME_DATA::ID),
33399            (CANFD_FRAME_DATA::NAME, CANFD_FRAME_DATA::ID),
33400            (CAN_FILTER_MODIFY_DATA::NAME, CAN_FILTER_MODIFY_DATA::ID),
33401            (
33402                ONBOARD_COMPUTER_STATUS_DATA::NAME,
33403                ONBOARD_COMPUTER_STATUS_DATA::ID,
33404            ),
33405            (
33406                COMPONENT_INFORMATION_DATA::NAME,
33407                COMPONENT_INFORMATION_DATA::ID,
33408            ),
33409            (
33410                COMPONENT_INFORMATION_BASIC_DATA::NAME,
33411                COMPONENT_INFORMATION_BASIC_DATA::ID,
33412            ),
33413            (COMPONENT_METADATA_DATA::NAME, COMPONENT_METADATA_DATA::ID),
33414            (PLAY_TUNE_V2_DATA::NAME, PLAY_TUNE_V2_DATA::ID),
33415            (SUPPORTED_TUNES_DATA::NAME, SUPPORTED_TUNES_DATA::ID),
33416            (EVENT_DATA::NAME, EVENT_DATA::ID),
33417            (
33418                CURRENT_EVENT_SEQUENCE_DATA::NAME,
33419                CURRENT_EVENT_SEQUENCE_DATA::ID,
33420            ),
33421            (REQUEST_EVENT_DATA::NAME, REQUEST_EVENT_DATA::ID),
33422            (
33423                RESPONSE_EVENT_ERROR_DATA::NAME,
33424                RESPONSE_EVENT_ERROR_DATA::ID,
33425            ),
33426            (AVAILABLE_MODES_DATA::NAME, AVAILABLE_MODES_DATA::ID),
33427            (CURRENT_MODE_DATA::NAME, CURRENT_MODE_DATA::ID),
33428            (
33429                AVAILABLE_MODES_MONITOR_DATA::NAME,
33430                AVAILABLE_MODES_MONITOR_DATA::ID,
33431            ),
33432            (ILLUMINATOR_STATUS_DATA::NAME, ILLUMINATOR_STATUS_DATA::ID),
33433            (WHEEL_DISTANCE_DATA::NAME, WHEEL_DISTANCE_DATA::ID),
33434            (WINCH_STATUS_DATA::NAME, WINCH_STATUS_DATA::ID),
33435            (
33436                OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
33437                OPEN_DRONE_ID_BASIC_ID_DATA::ID,
33438            ),
33439            (
33440                OPEN_DRONE_ID_LOCATION_DATA::NAME,
33441                OPEN_DRONE_ID_LOCATION_DATA::ID,
33442            ),
33443            (
33444                OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
33445                OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
33446            ),
33447            (
33448                OPEN_DRONE_ID_SELF_ID_DATA::NAME,
33449                OPEN_DRONE_ID_SELF_ID_DATA::ID,
33450            ),
33451            (
33452                OPEN_DRONE_ID_SYSTEM_DATA::NAME,
33453                OPEN_DRONE_ID_SYSTEM_DATA::ID,
33454            ),
33455            (
33456                OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
33457                OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
33458            ),
33459            (
33460                OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
33461                OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
33462            ),
33463            (
33464                OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
33465                OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
33466            ),
33467            (
33468                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
33469                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
33470            ),
33471            (HYGROMETER_SENSOR_DATA::NAME, HYGROMETER_SENSOR_DATA::ID),
33472        ]
33473    }
33474}
33475impl Message for MavMessage {
33476    fn parse(
33477        version: MavlinkVersion,
33478        id: u32,
33479        payload: &[u8],
33480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33481        match id {
33482            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33483                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33484                    .map(Self::ACTUATOR_CONTROL_TARGET)
33485            }
33486            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33487                .map(Self::ACTUATOR_OUTPUT_STATUS),
33488            ADSB_VEHICLE_DATA::ID => {
33489                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33490            }
33491            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33492            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33493            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33494            ATTITUDE_QUATERNION_DATA::ID => {
33495                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33496            }
33497            ATTITUDE_QUATERNION_COV_DATA::ID => {
33498                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33499                    .map(Self::ATTITUDE_QUATERNION_COV)
33500            }
33501            ATTITUDE_TARGET_DATA::ID => {
33502                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33503            }
33504            ATT_POS_MOCAP_DATA::ID => {
33505                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
33506            }
33507            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
33508            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33509                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
33510                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
33511            }
33512            AUTOPILOT_VERSION_DATA::ID => {
33513                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
33514            }
33515            AVAILABLE_MODES_DATA::ID => {
33516                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
33517            }
33518            AVAILABLE_MODES_MONITOR_DATA::ID => {
33519                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
33520                    .map(Self::AVAILABLE_MODES_MONITOR)
33521            }
33522            BATTERY_INFO_DATA::ID => {
33523                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
33524            }
33525            BATTERY_STATUS_DATA::ID => {
33526                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
33527            }
33528            BUTTON_CHANGE_DATA::ID => {
33529                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
33530            }
33531            CAMERA_CAPTURE_STATUS_DATA::ID => {
33532                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
33533            }
33534            CAMERA_FOV_STATUS_DATA::ID => {
33535                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
33536            }
33537            CAMERA_IMAGE_CAPTURED_DATA::ID => {
33538                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
33539            }
33540            CAMERA_INFORMATION_DATA::ID => {
33541                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
33542            }
33543            CAMERA_SETTINGS_DATA::ID => {
33544                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
33545            }
33546            CAMERA_THERMAL_RANGE_DATA::ID => {
33547                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
33548            }
33549            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
33550                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
33551                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
33552            }
33553            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
33554                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
33555                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
33556            }
33557            CAMERA_TRIGGER_DATA::ID => {
33558                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
33559            }
33560            CANFD_FRAME_DATA::ID => {
33561                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
33562            }
33563            CAN_FILTER_MODIFY_DATA::ID => {
33564                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
33565            }
33566            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
33567            CELLULAR_CONFIG_DATA::ID => {
33568                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
33569            }
33570            CELLULAR_STATUS_DATA::ID => {
33571                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
33572            }
33573            CHANGE_OPERATOR_CONTROL_DATA::ID => {
33574                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
33575                    .map(Self::CHANGE_OPERATOR_CONTROL)
33576            }
33577            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
33578                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
33579                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
33580            }
33581            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
33582            COMMAND_ACK_DATA::ID => {
33583                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
33584            }
33585            COMMAND_CANCEL_DATA::ID => {
33586                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
33587            }
33588            COMMAND_INT_DATA::ID => {
33589                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
33590            }
33591            COMMAND_LONG_DATA::ID => {
33592                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
33593            }
33594            COMPONENT_INFORMATION_DATA::ID => {
33595                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
33596            }
33597            COMPONENT_INFORMATION_BASIC_DATA::ID => {
33598                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
33599                    .map(Self::COMPONENT_INFORMATION_BASIC)
33600            }
33601            COMPONENT_METADATA_DATA::ID => {
33602                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
33603            }
33604            CONTROL_SYSTEM_STATE_DATA::ID => {
33605                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
33606            }
33607            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
33608                .map(Self::CURRENT_EVENT_SEQUENCE),
33609            CURRENT_MODE_DATA::ID => {
33610                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
33611            }
33612            DATA_STREAM_DATA::ID => {
33613                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
33614            }
33615            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
33616                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
33617                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
33618            }
33619            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
33620            DEBUG_FLOAT_ARRAY_DATA::ID => {
33621                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
33622            }
33623            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
33624            DISTANCE_SENSOR_DATA::ID => {
33625                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
33626            }
33627            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
33628            ENCAPSULATED_DATA_DATA::ID => {
33629                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
33630            }
33631            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
33632            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
33633            ESTIMATOR_STATUS_DATA::ID => {
33634                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
33635            }
33636            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
33637            EXTENDED_SYS_STATE_DATA::ID => {
33638                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
33639            }
33640            FENCE_STATUS_DATA::ID => {
33641                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
33642            }
33643            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
33644                .map(Self::FILE_TRANSFER_PROTOCOL),
33645            FLIGHT_INFORMATION_DATA::ID => {
33646                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
33647            }
33648            FOLLOW_TARGET_DATA::ID => {
33649                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
33650            }
33651            FUEL_STATUS_DATA::ID => {
33652                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
33653            }
33654            GENERATOR_STATUS_DATA::ID => {
33655                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
33656            }
33657            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
33658                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
33659                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
33660            }
33661            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
33662                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
33663                    .map(Self::GIMBAL_DEVICE_INFORMATION)
33664            }
33665            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
33666                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
33667                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
33668            }
33669            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
33670                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
33671                    .map(Self::GIMBAL_MANAGER_INFORMATION)
33672            }
33673            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
33674                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
33675                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
33676            }
33677            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33678                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
33679                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
33680            }
33681            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
33682                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
33683                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
33684            }
33685            GIMBAL_MANAGER_STATUS_DATA::ID => {
33686                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
33687            }
33688            GLOBAL_POSITION_INT_DATA::ID => {
33689                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
33690            }
33691            GLOBAL_POSITION_INT_COV_DATA::ID => {
33692                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
33693                    .map(Self::GLOBAL_POSITION_INT_COV)
33694            }
33695            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33696                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
33697                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
33698            }
33699            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
33700            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
33701            GPS_GLOBAL_ORIGIN_DATA::ID => {
33702                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
33703            }
33704            GPS_INJECT_DATA_DATA::ID => {
33705                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
33706            }
33707            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
33708            GPS_RAW_INT_DATA::ID => {
33709                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
33710            }
33711            GPS_RTCM_DATA_DATA::ID => {
33712                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
33713            }
33714            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
33715            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
33716            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
33717            HIGHRES_IMU_DATA::ID => {
33718                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
33719            }
33720            HIGH_LATENCY_DATA::ID => {
33721                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
33722            }
33723            HIGH_LATENCY2_DATA::ID => {
33724                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
33725            }
33726            HIL_ACTUATOR_CONTROLS_DATA::ID => {
33727                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
33728            }
33729            HIL_CONTROLS_DATA::ID => {
33730                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
33731            }
33732            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
33733            HIL_OPTICAL_FLOW_DATA::ID => {
33734                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
33735            }
33736            HIL_RC_INPUTS_RAW_DATA::ID => {
33737                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
33738            }
33739            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
33740            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
33741            HIL_STATE_QUATERNION_DATA::ID => {
33742                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
33743            }
33744            HOME_POSITION_DATA::ID => {
33745                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
33746            }
33747            HYGROMETER_SENSOR_DATA::ID => {
33748                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
33749            }
33750            ILLUMINATOR_STATUS_DATA::ID => {
33751                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
33752            }
33753            ISBD_LINK_STATUS_DATA::ID => {
33754                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
33755            }
33756            LANDING_TARGET_DATA::ID => {
33757                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
33758            }
33759            LINK_NODE_STATUS_DATA::ID => {
33760                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
33761            }
33762            LOCAL_POSITION_NED_DATA::ID => {
33763                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
33764            }
33765            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
33766                .map(Self::LOCAL_POSITION_NED_COV),
33767            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33768                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
33769                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
33770            }
33771            LOGGING_ACK_DATA::ID => {
33772                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
33773            }
33774            LOGGING_DATA_DATA::ID => {
33775                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
33776            }
33777            LOGGING_DATA_ACKED_DATA::ID => {
33778                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
33779            }
33780            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
33781            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
33782            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
33783            LOG_REQUEST_DATA_DATA::ID => {
33784                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
33785            }
33786            LOG_REQUEST_END_DATA::ID => {
33787                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
33788            }
33789            LOG_REQUEST_LIST_DATA::ID => {
33790                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
33791            }
33792            MAG_CAL_REPORT_DATA::ID => {
33793                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
33794            }
33795            MANUAL_CONTROL_DATA::ID => {
33796                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
33797            }
33798            MANUAL_SETPOINT_DATA::ID => {
33799                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
33800            }
33801            MEMORY_VECT_DATA::ID => {
33802                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
33803            }
33804            MESSAGE_INTERVAL_DATA::ID => {
33805                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
33806            }
33807            MISSION_ACK_DATA::ID => {
33808                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
33809            }
33810            MISSION_CLEAR_ALL_DATA::ID => {
33811                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
33812            }
33813            MISSION_COUNT_DATA::ID => {
33814                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
33815            }
33816            MISSION_CURRENT_DATA::ID => {
33817                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
33818            }
33819            MISSION_ITEM_DATA::ID => {
33820                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
33821            }
33822            MISSION_ITEM_INT_DATA::ID => {
33823                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
33824            }
33825            MISSION_ITEM_REACHED_DATA::ID => {
33826                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
33827            }
33828            MISSION_REQUEST_DATA::ID => {
33829                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
33830            }
33831            MISSION_REQUEST_INT_DATA::ID => {
33832                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
33833            }
33834            MISSION_REQUEST_LIST_DATA::ID => {
33835                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
33836            }
33837            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
33838                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
33839                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
33840            }
33841            MISSION_SET_CURRENT_DATA::ID => {
33842                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
33843            }
33844            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
33845                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
33846                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
33847            }
33848            MOUNT_ORIENTATION_DATA::ID => {
33849                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
33850            }
33851            NAMED_VALUE_FLOAT_DATA::ID => {
33852                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
33853            }
33854            NAMED_VALUE_INT_DATA::ID => {
33855                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
33856            }
33857            NAV_CONTROLLER_OUTPUT_DATA::ID => {
33858                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
33859            }
33860            OBSTACLE_DISTANCE_DATA::ID => {
33861                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
33862            }
33863            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
33864            ONBOARD_COMPUTER_STATUS_DATA::ID => {
33865                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
33866                    .map(Self::ONBOARD_COMPUTER_STATUS)
33867            }
33868            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
33869                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
33870                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
33871            }
33872            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
33873                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
33874                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
33875            }
33876            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
33877                .map(Self::OPEN_DRONE_ID_BASIC_ID),
33878            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
33879                .map(Self::OPEN_DRONE_ID_LOCATION),
33880            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
33881                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
33882                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
33883            }
33884            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
33885                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
33886                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
33887            }
33888            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
33889                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
33890            }
33891            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
33892                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
33893            }
33894            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
33895                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
33896                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
33897            }
33898            OPTICAL_FLOW_DATA::ID => {
33899                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
33900            }
33901            OPTICAL_FLOW_RAD_DATA::ID => {
33902                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
33903            }
33904            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
33905                .map(Self::ORBIT_EXECUTION_STATUS),
33906            PARAM_EXT_ACK_DATA::ID => {
33907                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
33908            }
33909            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
33910                .map(Self::PARAM_EXT_REQUEST_LIST),
33911            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
33912                .map(Self::PARAM_EXT_REQUEST_READ),
33913            PARAM_EXT_SET_DATA::ID => {
33914                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
33915            }
33916            PARAM_EXT_VALUE_DATA::ID => {
33917                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
33918            }
33919            PARAM_MAP_RC_DATA::ID => {
33920                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
33921            }
33922            PARAM_REQUEST_LIST_DATA::ID => {
33923                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
33924            }
33925            PARAM_REQUEST_READ_DATA::ID => {
33926                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
33927            }
33928            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
33929            PARAM_VALUE_DATA::ID => {
33930                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
33931            }
33932            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
33933            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
33934            PLAY_TUNE_V2_DATA::ID => {
33935                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
33936            }
33937            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
33938                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
33939                    .map(Self::POSITION_TARGET_GLOBAL_INT)
33940            }
33941            POSITION_TARGET_LOCAL_NED_DATA::ID => {
33942                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
33943                    .map(Self::POSITION_TARGET_LOCAL_NED)
33944            }
33945            POWER_STATUS_DATA::ID => {
33946                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
33947            }
33948            PROTOCOL_VERSION_DATA::ID => {
33949                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
33950            }
33951            RADIO_STATUS_DATA::ID => {
33952                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
33953            }
33954            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
33955            RAW_PRESSURE_DATA::ID => {
33956                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
33957            }
33958            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
33959            RC_CHANNELS_DATA::ID => {
33960                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
33961            }
33962            RC_CHANNELS_OVERRIDE_DATA::ID => {
33963                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
33964            }
33965            RC_CHANNELS_RAW_DATA::ID => {
33966                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
33967            }
33968            RC_CHANNELS_SCALED_DATA::ID => {
33969                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
33970            }
33971            REQUEST_DATA_STREAM_DATA::ID => {
33972                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
33973            }
33974            REQUEST_EVENT_DATA::ID => {
33975                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
33976            }
33977            RESOURCE_REQUEST_DATA::ID => {
33978                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
33979            }
33980            RESPONSE_EVENT_ERROR_DATA::ID => {
33981                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
33982            }
33983            SAFETY_ALLOWED_AREA_DATA::ID => {
33984                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
33985            }
33986            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
33987                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
33988                    .map(Self::SAFETY_SET_ALLOWED_AREA)
33989            }
33990            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
33991            SCALED_IMU2_DATA::ID => {
33992                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
33993            }
33994            SCALED_IMU3_DATA::ID => {
33995                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
33996            }
33997            SCALED_PRESSURE_DATA::ID => {
33998                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
33999            }
34000            SCALED_PRESSURE2_DATA::ID => {
34001                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34002            }
34003            SCALED_PRESSURE3_DATA::ID => {
34004                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34005            }
34006            SERIAL_CONTROL_DATA::ID => {
34007                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34008            }
34009            SERVO_OUTPUT_RAW_DATA::ID => {
34010                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34011            }
34012            SETUP_SIGNING_DATA::ID => {
34013                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34014            }
34015            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34016                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34017                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34018            }
34019            SET_ATTITUDE_TARGET_DATA::ID => {
34020                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34021            }
34022            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34023                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34024            }
34025            SET_HOME_POSITION_DATA::ID => {
34026                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34027            }
34028            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34029            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34030                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34031                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34032            }
34033            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34034                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34035                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34036            }
34037            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34038            SMART_BATTERY_INFO_DATA::ID => {
34039                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34040            }
34041            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34042            STORAGE_INFORMATION_DATA::ID => {
34043                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34044            }
34045            SUPPORTED_TUNES_DATA::ID => {
34046                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34047            }
34048            SYSTEM_TIME_DATA::ID => {
34049                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34050            }
34051            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34052            TERRAIN_CHECK_DATA::ID => {
34053                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34054            }
34055            TERRAIN_DATA_DATA::ID => {
34056                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34057            }
34058            TERRAIN_REPORT_DATA::ID => {
34059                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34060            }
34061            TERRAIN_REQUEST_DATA::ID => {
34062                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34063            }
34064            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34065            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34066                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34067                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34068            }
34069            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34070                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34071                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34072            }
34073            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34074                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34075                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34076            }
34077            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34078            UAVCAN_NODE_INFO_DATA::ID => {
34079                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34080            }
34081            UAVCAN_NODE_STATUS_DATA::ID => {
34082                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34083            }
34084            UTM_GLOBAL_POSITION_DATA::ID => {
34085                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34086            }
34087            V2_EXTENSION_DATA::ID => {
34088                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34089            }
34090            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34091            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34092            VICON_POSITION_ESTIMATE_DATA::ID => {
34093                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34094                    .map(Self::VICON_POSITION_ESTIMATE)
34095            }
34096            VIDEO_STREAM_INFORMATION_DATA::ID => {
34097                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34098                    .map(Self::VIDEO_STREAM_INFORMATION)
34099            }
34100            VIDEO_STREAM_STATUS_DATA::ID => {
34101                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34102            }
34103            VISION_POSITION_ESTIMATE_DATA::ID => {
34104                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34105                    .map(Self::VISION_POSITION_ESTIMATE)
34106            }
34107            VISION_SPEED_ESTIMATE_DATA::ID => {
34108                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34109            }
34110            WHEEL_DISTANCE_DATA::ID => {
34111                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34112            }
34113            WIFI_CONFIG_AP_DATA::ID => {
34114                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34115            }
34116            WINCH_STATUS_DATA::ID => {
34117                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34118            }
34119            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34120            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34121        }
34122    }
34123    fn message_name(&self) -> &'static str {
34124        match self {
34125            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34126            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34127            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34128            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34129            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34130            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34131            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34132            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34133            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34134            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34135            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34136            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34137                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34138            }
34139            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34140            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34141            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34142            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34143            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34144            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34145            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34146            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34147            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34148            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34149            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34150            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34151            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34152            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34153            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34154            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34155            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34156            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34157            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34158            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34159            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34160            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34161            Self::COLLISION(..) => COLLISION_DATA::NAME,
34162            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34163            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34164            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34165            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34166            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34167            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34168            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34169            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34170            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34171            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34172            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34173            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34174            Self::DEBUG(..) => DEBUG_DATA::NAME,
34175            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34176            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34177            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34178            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34179            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34180            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34181            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34182            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34183            Self::EVENT(..) => EVENT_DATA::NAME,
34184            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34185            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34186            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34187            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34188            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34189            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34190            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34191            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34192            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34193            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34194            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34195            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34196            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34197                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34198            }
34199            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34200            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34201            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34202            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34203            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34204            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34205            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34206            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34207            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34208            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34209            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34210            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34211            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34212            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34213            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34214            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34215            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34216            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34217            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34218            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34219            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34220            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34221            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34222            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34223            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34224            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34225            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34226            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34227            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34228            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34229            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34230            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34231            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34232            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34233            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34234                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34235            }
34236            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34237            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34238            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34239            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34240            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34241            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34242            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34243            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34244            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34245            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34246            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34247            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34248            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34249            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34250            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34251            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34252            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34253            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34254            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34255            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34256            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34257            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34258            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34259            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34260            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34261            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34262            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34263            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34264            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34265            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34266            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34267            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34268            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34269            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34270            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34271            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34272            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34273            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34274            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34275            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34276            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34277            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34278            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34279            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34280            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34281            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34282            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34283            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34284            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34285            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34286            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34287            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34288            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34289            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34290            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34291            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34292            Self::PING(..) => PING_DATA::NAME,
34293            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34294            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34295            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34296            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34297            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34298            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34299            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34300            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34301            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34302            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34303            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34304            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34305            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34306            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34307            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34308            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34309            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34310            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34311            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34312            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34313            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34314            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34315            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34316            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34317            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34318            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34319            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34320            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34321            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34322            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34323            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34324            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34325            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34326            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34327            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34328            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34329            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34330            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34331            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34332            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34333            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34334            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34335            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34336            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34337            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34338            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34339            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34340            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34341            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34342            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34343                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34344            }
34345            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34346                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34347            }
34348            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34349            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34350            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34351            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34352            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34353            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34354            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34355            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34356            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34357            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34358            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34359            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34360            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34361            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34362            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34363            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34364        }
34365    }
34366    fn message_id(&self) -> u32 {
34367        match self {
34368            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34369            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34370            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34371            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34372            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34373            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34374            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34375            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34376            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34377            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34378            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34379            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34380                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34381            }
34382            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34383            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34384            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34385            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34386            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34387            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34388            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34389            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34390            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34391            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34392            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34393            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34394            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34395            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34396            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34397            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34398            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34399            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34400            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34401            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34402            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34403            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34404            Self::COLLISION(..) => COLLISION_DATA::ID,
34405            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34406            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34407            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34408            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34409            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34410            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34411            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34412            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34413            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34414            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34415            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34416            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34417            Self::DEBUG(..) => DEBUG_DATA::ID,
34418            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34419            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34420            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34421            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34422            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34423            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34424            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34425            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34426            Self::EVENT(..) => EVENT_DATA::ID,
34427            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34428            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34429            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34430            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34431            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34432            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34433            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34434            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34435            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34436            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34437            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34438            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34439            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34440                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34441            }
34442            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34443            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34444            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34445            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34446            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34447            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34448            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34449            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34450            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34451            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34452            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34453            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34454            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34455            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34456            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34457            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34458            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34459            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34460            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34461            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34462            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34463            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34464            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34465            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34466            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34467            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34468            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34469            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34470            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34471            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34472            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
34473            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
34474            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
34475            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
34476            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34477                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
34478            }
34479            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
34480            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
34481            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
34482            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
34483            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
34484            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
34485            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
34486            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
34487            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
34488            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
34489            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
34490            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
34491            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
34492            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
34493            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
34494            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
34495            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
34496            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
34497            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
34498            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
34499            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
34500            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
34501            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
34502            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
34503            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
34504            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
34505            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
34506            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
34507            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
34508            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
34509            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
34510            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
34511            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
34512            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
34513            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
34514            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
34515            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
34516            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
34517            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
34518            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
34519            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
34520            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
34521            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
34522            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
34523            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
34524            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
34525            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
34526            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
34527            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
34528            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
34529            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
34530            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
34531            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
34532            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
34533            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
34534            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
34535            Self::PING(..) => PING_DATA::ID,
34536            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
34537            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
34538            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
34539            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
34540            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
34541            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
34542            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
34543            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
34544            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
34545            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
34546            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
34547            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
34548            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
34549            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
34550            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
34551            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
34552            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
34553            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
34554            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
34555            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
34556            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
34557            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
34558            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
34559            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
34560            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
34561            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
34562            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
34563            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
34564            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
34565            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
34566            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
34567            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
34568            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
34569            Self::SET_MODE(..) => SET_MODE_DATA::ID,
34570            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
34571            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
34572            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
34573            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
34574            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
34575            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
34576            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
34577            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
34578            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
34579            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
34580            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
34581            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
34582            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
34583            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
34584            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
34585            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
34586            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34587                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
34588            }
34589            Self::TUNNEL(..) => TUNNEL_DATA::ID,
34590            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
34591            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
34592            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
34593            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
34594            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
34595            Self::VIBRATION(..) => VIBRATION_DATA::ID,
34596            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
34597            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
34598            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
34599            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
34600            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
34601            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
34602            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
34603            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
34604            Self::WIND_COV(..) => WIND_COV_DATA::ID,
34605        }
34606    }
34607    fn message_id_from_name(name: &str) -> Option<u32> {
34608        match name {
34609            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
34610            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
34611            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
34612            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
34613            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
34614            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
34615            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
34616            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
34617            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
34618            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
34619            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
34620            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
34621                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
34622            }
34623            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
34624            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
34625            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
34626            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
34627            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
34628            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
34629            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
34630            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
34631            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
34632            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
34633            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
34634            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
34635            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
34636            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
34637            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
34638            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
34639            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
34640            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
34641            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
34642            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
34643            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
34644            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
34645            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
34646            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
34647            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
34648            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
34649            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
34650            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
34651            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
34652            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
34653            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
34654            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
34655            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
34656            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
34657            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
34658            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
34659            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
34660            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
34661            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
34662            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
34663            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
34664            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
34665            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
34666            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
34667            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
34668            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
34669            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
34670            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
34671            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
34672            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
34673            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
34674            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
34675            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
34676                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
34677            }
34678            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
34679            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
34680            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
34681            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
34682            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
34683                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
34684            }
34685            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
34686            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
34687            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
34688            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
34689            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
34690                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
34691            }
34692            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
34693            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
34694            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
34695            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
34696            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
34697            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
34698            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
34699            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
34700            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
34701            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
34702            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
34703            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
34704            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
34705            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
34706            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
34707            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
34708            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
34709            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
34710            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
34711            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
34712            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
34713            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
34714            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
34715            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
34716            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
34717            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
34718            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
34719            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
34720            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
34721            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
34722                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
34723            }
34724            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
34725            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
34726            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
34727            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
34728            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
34729            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
34730            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
34731            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
34732            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
34733            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
34734            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
34735            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
34736            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
34737            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
34738            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
34739            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
34740            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
34741            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
34742            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
34743            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
34744            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
34745            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
34746            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
34747            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
34748            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
34749            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
34750            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
34751            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
34752            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
34753            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
34754            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
34755            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
34756            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
34757            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
34758            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
34759            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
34760            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
34761            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
34762            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
34763            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
34764            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
34765            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
34766            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
34767            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
34768            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
34769            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
34770            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
34771            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
34772            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
34773            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
34774            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
34775            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
34776            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
34777            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
34778            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
34779            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
34780            PING_DATA::NAME => Some(PING_DATA::ID),
34781            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
34782            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
34783            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
34784            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
34785            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
34786            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
34787            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
34788            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
34789            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
34790            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
34791            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
34792            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
34793            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
34794            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
34795            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
34796            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
34797            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
34798            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
34799            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
34800            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
34801            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
34802            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
34803            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
34804            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
34805            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
34806            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
34807            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
34808            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
34809            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
34810            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
34811            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
34812            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
34813            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
34814            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
34815            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
34816                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
34817            }
34818            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
34819                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
34820            }
34821            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
34822            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
34823            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
34824            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
34825            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
34826            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
34827            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
34828            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
34829            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
34830            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
34831            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
34832            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
34833            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
34834            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
34835                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
34836            }
34837            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
34838                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
34839            }
34840            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
34841            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
34842            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
34843            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
34844            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
34845            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
34846            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
34847            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
34848            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
34849            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
34850            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
34851            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
34852            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
34853            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
34854            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
34855            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
34856            _ => None,
34857        }
34858    }
34859    fn default_message_from_id(id: u32) -> Option<Self> {
34860        match id {
34861            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34862                ACTUATOR_CONTROL_TARGET_DATA::default(),
34863            )),
34864            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34865                ACTUATOR_OUTPUT_STATUS_DATA::default(),
34866            )),
34867            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
34868            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
34869            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
34870            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
34871            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34872                ATTITUDE_QUATERNION_DATA::default(),
34873            )),
34874            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
34875                ATTITUDE_QUATERNION_COV_DATA::default(),
34876            )),
34877            ATTITUDE_TARGET_DATA::ID => {
34878                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
34879            }
34880            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
34881            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
34882            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34883                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
34884                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
34885                ))
34886            }
34887            AUTOPILOT_VERSION_DATA::ID => {
34888                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
34889            }
34890            AVAILABLE_MODES_DATA::ID => {
34891                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
34892            }
34893            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
34894                AVAILABLE_MODES_MONITOR_DATA::default(),
34895            )),
34896            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
34897            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
34898            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
34899            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
34900                CAMERA_CAPTURE_STATUS_DATA::default(),
34901            )),
34902            CAMERA_FOV_STATUS_DATA::ID => {
34903                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
34904            }
34905            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
34906                CAMERA_IMAGE_CAPTURED_DATA::default(),
34907            )),
34908            CAMERA_INFORMATION_DATA::ID => {
34909                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
34910            }
34911            CAMERA_SETTINGS_DATA::ID => {
34912                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
34913            }
34914            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
34915                CAMERA_THERMAL_RANGE_DATA::default(),
34916            )),
34917            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
34918                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
34919            )),
34920            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
34921                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
34922            )),
34923            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
34924            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
34925            CAN_FILTER_MODIFY_DATA::ID => {
34926                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
34927            }
34928            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
34929            CELLULAR_CONFIG_DATA::ID => {
34930                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
34931            }
34932            CELLULAR_STATUS_DATA::ID => {
34933                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
34934            }
34935            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
34936                CHANGE_OPERATOR_CONTROL_DATA::default(),
34937            )),
34938            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
34939                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
34940            )),
34941            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
34942            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
34943            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
34944            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
34945            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
34946            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
34947                COMPONENT_INFORMATION_DATA::default(),
34948            )),
34949            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
34950                COMPONENT_INFORMATION_BASIC_DATA::default(),
34951            )),
34952            COMPONENT_METADATA_DATA::ID => {
34953                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
34954            }
34955            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
34956                CONTROL_SYSTEM_STATE_DATA::default(),
34957            )),
34958            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
34959                CURRENT_EVENT_SEQUENCE_DATA::default(),
34960            )),
34961            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
34962            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
34963            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
34964                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
34965            )),
34966            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
34967            DEBUG_FLOAT_ARRAY_DATA::ID => {
34968                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
34969            }
34970            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
34971            DISTANCE_SENSOR_DATA::ID => {
34972                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
34973            }
34974            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
34975            ENCAPSULATED_DATA_DATA::ID => {
34976                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
34977            }
34978            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
34979            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
34980            ESTIMATOR_STATUS_DATA::ID => {
34981                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
34982            }
34983            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
34984            EXTENDED_SYS_STATE_DATA::ID => {
34985                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
34986            }
34987            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
34988            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
34989                FILE_TRANSFER_PROTOCOL_DATA::default(),
34990            )),
34991            FLIGHT_INFORMATION_DATA::ID => {
34992                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
34993            }
34994            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
34995            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
34996            GENERATOR_STATUS_DATA::ID => {
34997                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
34998            }
34999            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35000                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35001            )),
35002            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35003                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35004            )),
35005            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35006                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35007            )),
35008            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35009                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35010            )),
35011            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35012                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35013            )),
35014            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35015                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35016                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35017                ))
35018            }
35019            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35020                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35021            )),
35022            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35023                GIMBAL_MANAGER_STATUS_DATA::default(),
35024            )),
35025            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35026                GLOBAL_POSITION_INT_DATA::default(),
35027            )),
35028            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35029                GLOBAL_POSITION_INT_COV_DATA::default(),
35030            )),
35031            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35032                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35033                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35034                ))
35035            }
35036            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35037            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35038            GPS_GLOBAL_ORIGIN_DATA::ID => {
35039                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35040            }
35041            GPS_INJECT_DATA_DATA::ID => {
35042                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35043            }
35044            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35045            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35046            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35047            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35048            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35049            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35050            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35051            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35052            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35053            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35054                HIL_ACTUATOR_CONTROLS_DATA::default(),
35055            )),
35056            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35057            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35058            HIL_OPTICAL_FLOW_DATA::ID => {
35059                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35060            }
35061            HIL_RC_INPUTS_RAW_DATA::ID => {
35062                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35063            }
35064            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35065            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35066            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35067                HIL_STATE_QUATERNION_DATA::default(),
35068            )),
35069            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35070            HYGROMETER_SENSOR_DATA::ID => {
35071                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35072            }
35073            ILLUMINATOR_STATUS_DATA::ID => {
35074                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35075            }
35076            ISBD_LINK_STATUS_DATA::ID => {
35077                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35078            }
35079            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35080            LINK_NODE_STATUS_DATA::ID => {
35081                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35082            }
35083            LOCAL_POSITION_NED_DATA::ID => {
35084                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35085            }
35086            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35087                LOCAL_POSITION_NED_COV_DATA::default(),
35088            )),
35089            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35090                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35091                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35092                ))
35093            }
35094            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35095            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35096            LOGGING_DATA_ACKED_DATA::ID => {
35097                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35098            }
35099            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35100            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35101            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35102            LOG_REQUEST_DATA_DATA::ID => {
35103                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35104            }
35105            LOG_REQUEST_END_DATA::ID => {
35106                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35107            }
35108            LOG_REQUEST_LIST_DATA::ID => {
35109                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35110            }
35111            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35112            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35113            MANUAL_SETPOINT_DATA::ID => {
35114                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35115            }
35116            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35117            MESSAGE_INTERVAL_DATA::ID => {
35118                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35119            }
35120            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35121            MISSION_CLEAR_ALL_DATA::ID => {
35122                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35123            }
35124            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35125            MISSION_CURRENT_DATA::ID => {
35126                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35127            }
35128            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35129            MISSION_ITEM_INT_DATA::ID => {
35130                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35131            }
35132            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35133                MISSION_ITEM_REACHED_DATA::default(),
35134            )),
35135            MISSION_REQUEST_DATA::ID => {
35136                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35137            }
35138            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35139                MISSION_REQUEST_INT_DATA::default(),
35140            )),
35141            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35142                MISSION_REQUEST_LIST_DATA::default(),
35143            )),
35144            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35145                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35146            )),
35147            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35148                MISSION_SET_CURRENT_DATA::default(),
35149            )),
35150            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35151                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35152            )),
35153            MOUNT_ORIENTATION_DATA::ID => {
35154                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35155            }
35156            NAMED_VALUE_FLOAT_DATA::ID => {
35157                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35158            }
35159            NAMED_VALUE_INT_DATA::ID => {
35160                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35161            }
35162            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35163                NAV_CONTROLLER_OUTPUT_DATA::default(),
35164            )),
35165            OBSTACLE_DISTANCE_DATA::ID => {
35166                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35167            }
35168            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35169            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35170                ONBOARD_COMPUTER_STATUS_DATA::default(),
35171            )),
35172            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35173                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35174            )),
35175            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35176                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35177            )),
35178            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35179                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35180            )),
35181            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35182                OPEN_DRONE_ID_LOCATION_DATA::default(),
35183            )),
35184            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35185                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35186            )),
35187            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35188                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35189            )),
35190            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35191                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35192            )),
35193            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35194                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35195            )),
35196            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35197                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35198            )),
35199            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35200            OPTICAL_FLOW_RAD_DATA::ID => {
35201                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35202            }
35203            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35204                ORBIT_EXECUTION_STATUS_DATA::default(),
35205            )),
35206            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35207            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35208                PARAM_EXT_REQUEST_LIST_DATA::default(),
35209            )),
35210            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35211                PARAM_EXT_REQUEST_READ_DATA::default(),
35212            )),
35213            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35214            PARAM_EXT_VALUE_DATA::ID => {
35215                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35216            }
35217            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35218            PARAM_REQUEST_LIST_DATA::ID => {
35219                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35220            }
35221            PARAM_REQUEST_READ_DATA::ID => {
35222                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35223            }
35224            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35225            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35226            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35227            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35228            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35229            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35230                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35231            )),
35232            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35233                POSITION_TARGET_LOCAL_NED_DATA::default(),
35234            )),
35235            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35236            PROTOCOL_VERSION_DATA::ID => {
35237                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35238            }
35239            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35240            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35241            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35242            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35243            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35244            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35245                RC_CHANNELS_OVERRIDE_DATA::default(),
35246            )),
35247            RC_CHANNELS_RAW_DATA::ID => {
35248                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35249            }
35250            RC_CHANNELS_SCALED_DATA::ID => {
35251                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35252            }
35253            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35254                REQUEST_DATA_STREAM_DATA::default(),
35255            )),
35256            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35257            RESOURCE_REQUEST_DATA::ID => {
35258                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35259            }
35260            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35261                RESPONSE_EVENT_ERROR_DATA::default(),
35262            )),
35263            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35264                SAFETY_ALLOWED_AREA_DATA::default(),
35265            )),
35266            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35267                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35268            )),
35269            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35270            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35271            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35272            SCALED_PRESSURE_DATA::ID => {
35273                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35274            }
35275            SCALED_PRESSURE2_DATA::ID => {
35276                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35277            }
35278            SCALED_PRESSURE3_DATA::ID => {
35279                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35280            }
35281            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35282            SERVO_OUTPUT_RAW_DATA::ID => {
35283                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35284            }
35285            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35286            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35287                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35288            )),
35289            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35290                SET_ATTITUDE_TARGET_DATA::default(),
35291            )),
35292            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35293                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35294            )),
35295            SET_HOME_POSITION_DATA::ID => {
35296                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35297            }
35298            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35299            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35300                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35301            )),
35302            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35303                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35304            )),
35305            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35306            SMART_BATTERY_INFO_DATA::ID => {
35307                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35308            }
35309            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35310            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35311                STORAGE_INFORMATION_DATA::default(),
35312            )),
35313            SUPPORTED_TUNES_DATA::ID => {
35314                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35315            }
35316            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35317            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35318            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35319            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35320            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35321            TERRAIN_REQUEST_DATA::ID => {
35322                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35323            }
35324            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35325            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35326                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35327            )),
35328            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35329                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35330                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35331                ))
35332            }
35333            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35334                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35335                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35336                ))
35337            }
35338            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35339            UAVCAN_NODE_INFO_DATA::ID => {
35340                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35341            }
35342            UAVCAN_NODE_STATUS_DATA::ID => {
35343                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35344            }
35345            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35346                UTM_GLOBAL_POSITION_DATA::default(),
35347            )),
35348            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35349            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35350            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35351            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35352                VICON_POSITION_ESTIMATE_DATA::default(),
35353            )),
35354            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35355                VIDEO_STREAM_INFORMATION_DATA::default(),
35356            )),
35357            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35358                VIDEO_STREAM_STATUS_DATA::default(),
35359            )),
35360            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35361                VISION_POSITION_ESTIMATE_DATA::default(),
35362            )),
35363            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35364                VISION_SPEED_ESTIMATE_DATA::default(),
35365            )),
35366            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35367            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35368            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35369            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35370            _ => None,
35371        }
35372    }
35373    #[cfg(feature = "arbitrary")]
35374    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35375        match id {
35376            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35377                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35378            )),
35379            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35380                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35381            )),
35382            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35383            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35384            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35385            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35386            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35387                ATTITUDE_QUATERNION_DATA::random(rng),
35388            )),
35389            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35390                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35391            )),
35392            ATTITUDE_TARGET_DATA::ID => {
35393                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35394            }
35395            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35396            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35397            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35398                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35399                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35400                ))
35401            }
35402            AUTOPILOT_VERSION_DATA::ID => {
35403                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35404            }
35405            AVAILABLE_MODES_DATA::ID => {
35406                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35407            }
35408            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35409                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35410            )),
35411            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35412            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35413            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35414            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35415                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35416            )),
35417            CAMERA_FOV_STATUS_DATA::ID => {
35418                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35419            }
35420            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35421                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35422            )),
35423            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35424                CAMERA_INFORMATION_DATA::random(rng),
35425            )),
35426            CAMERA_SETTINGS_DATA::ID => {
35427                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35428            }
35429            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35430                CAMERA_THERMAL_RANGE_DATA::random(rng),
35431            )),
35432            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35433                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35434            )),
35435            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35436                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35437            )),
35438            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35439            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35440            CAN_FILTER_MODIFY_DATA::ID => {
35441                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35442            }
35443            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35444            CELLULAR_CONFIG_DATA::ID => {
35445                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
35446            }
35447            CELLULAR_STATUS_DATA::ID => {
35448                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
35449            }
35450            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35451                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
35452            )),
35453            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35454                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
35455            )),
35456            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
35457            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
35458            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
35459            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
35460            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
35461            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35462                COMPONENT_INFORMATION_DATA::random(rng),
35463            )),
35464            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35465                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
35466            )),
35467            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
35468                COMPONENT_METADATA_DATA::random(rng),
35469            )),
35470            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35471                CONTROL_SYSTEM_STATE_DATA::random(rng),
35472            )),
35473            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35474                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
35475            )),
35476            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
35477            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
35478            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35479                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
35480            )),
35481            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
35482            DEBUG_FLOAT_ARRAY_DATA::ID => {
35483                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
35484            }
35485            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
35486            DISTANCE_SENSOR_DATA::ID => {
35487                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
35488            }
35489            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
35490            ENCAPSULATED_DATA_DATA::ID => {
35491                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
35492            }
35493            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
35494            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
35495            ESTIMATOR_STATUS_DATA::ID => {
35496                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
35497            }
35498            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
35499            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
35500                EXTENDED_SYS_STATE_DATA::random(rng),
35501            )),
35502            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
35503            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35504                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
35505            )),
35506            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
35507                FLIGHT_INFORMATION_DATA::random(rng),
35508            )),
35509            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
35510            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
35511            GENERATOR_STATUS_DATA::ID => {
35512                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
35513            }
35514            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35515                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
35516            )),
35517            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35518                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
35519            )),
35520            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35521                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
35522            )),
35523            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35524                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
35525            )),
35526            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35527                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
35528            )),
35529            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35530                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35531                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
35532                ))
35533            }
35534            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35535                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
35536            )),
35537            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35538                GIMBAL_MANAGER_STATUS_DATA::random(rng),
35539            )),
35540            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35541                GLOBAL_POSITION_INT_DATA::random(rng),
35542            )),
35543            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35544                GLOBAL_POSITION_INT_COV_DATA::random(rng),
35545            )),
35546            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35547                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35548                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
35549                ))
35550            }
35551            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
35552            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
35553            GPS_GLOBAL_ORIGIN_DATA::ID => {
35554                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
35555            }
35556            GPS_INJECT_DATA_DATA::ID => {
35557                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
35558            }
35559            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
35560            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
35561            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
35562            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
35563            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
35564            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
35565            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
35566            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
35567            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
35568            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35569                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
35570            )),
35571            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
35572            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
35573            HIL_OPTICAL_FLOW_DATA::ID => {
35574                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
35575            }
35576            HIL_RC_INPUTS_RAW_DATA::ID => {
35577                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
35578            }
35579            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
35580            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
35581            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35582                HIL_STATE_QUATERNION_DATA::random(rng),
35583            )),
35584            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
35585            HYGROMETER_SENSOR_DATA::ID => {
35586                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
35587            }
35588            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
35589                ILLUMINATOR_STATUS_DATA::random(rng),
35590            )),
35591            ISBD_LINK_STATUS_DATA::ID => {
35592                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
35593            }
35594            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
35595            LINK_NODE_STATUS_DATA::ID => {
35596                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
35597            }
35598            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
35599                LOCAL_POSITION_NED_DATA::random(rng),
35600            )),
35601            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35602                LOCAL_POSITION_NED_COV_DATA::random(rng),
35603            )),
35604            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35605                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35606                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
35607                ))
35608            }
35609            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
35610            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
35611            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
35612                LOGGING_DATA_ACKED_DATA::random(rng),
35613            )),
35614            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
35615            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
35616            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
35617            LOG_REQUEST_DATA_DATA::ID => {
35618                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
35619            }
35620            LOG_REQUEST_END_DATA::ID => {
35621                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
35622            }
35623            LOG_REQUEST_LIST_DATA::ID => {
35624                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
35625            }
35626            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
35627            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
35628            MANUAL_SETPOINT_DATA::ID => {
35629                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
35630            }
35631            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
35632            MESSAGE_INTERVAL_DATA::ID => {
35633                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
35634            }
35635            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
35636            MISSION_CLEAR_ALL_DATA::ID => {
35637                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
35638            }
35639            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
35640            MISSION_CURRENT_DATA::ID => {
35641                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
35642            }
35643            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
35644            MISSION_ITEM_INT_DATA::ID => {
35645                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
35646            }
35647            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35648                MISSION_ITEM_REACHED_DATA::random(rng),
35649            )),
35650            MISSION_REQUEST_DATA::ID => {
35651                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
35652            }
35653            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35654                MISSION_REQUEST_INT_DATA::random(rng),
35655            )),
35656            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35657                MISSION_REQUEST_LIST_DATA::random(rng),
35658            )),
35659            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35660                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
35661            )),
35662            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35663                MISSION_SET_CURRENT_DATA::random(rng),
35664            )),
35665            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35666                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
35667            )),
35668            MOUNT_ORIENTATION_DATA::ID => {
35669                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
35670            }
35671            NAMED_VALUE_FLOAT_DATA::ID => {
35672                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
35673            }
35674            NAMED_VALUE_INT_DATA::ID => {
35675                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
35676            }
35677            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35678                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
35679            )),
35680            OBSTACLE_DISTANCE_DATA::ID => {
35681                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
35682            }
35683            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
35684            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35685                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
35686            )),
35687            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35688                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
35689            )),
35690            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35691                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
35692            )),
35693            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35694                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
35695            )),
35696            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35697                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
35698            )),
35699            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35700                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
35701            )),
35702            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35703                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
35704            )),
35705            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35706                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
35707            )),
35708            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35709                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
35710            )),
35711            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35712                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
35713            )),
35714            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
35715            OPTICAL_FLOW_RAD_DATA::ID => {
35716                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
35717            }
35718            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35719                ORBIT_EXECUTION_STATUS_DATA::random(rng),
35720            )),
35721            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
35722            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35723                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
35724            )),
35725            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35726                PARAM_EXT_REQUEST_READ_DATA::random(rng),
35727            )),
35728            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
35729            PARAM_EXT_VALUE_DATA::ID => {
35730                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
35731            }
35732            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
35733            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
35734                PARAM_REQUEST_LIST_DATA::random(rng),
35735            )),
35736            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
35737                PARAM_REQUEST_READ_DATA::random(rng),
35738            )),
35739            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
35740            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
35741            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
35742            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
35743            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
35744            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35745                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35746            )),
35747            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35748                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35749            )),
35750            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
35751            PROTOCOL_VERSION_DATA::ID => {
35752                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
35753            }
35754            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
35755            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
35756            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
35757            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
35758            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
35759            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35760                RC_CHANNELS_OVERRIDE_DATA::random(rng),
35761            )),
35762            RC_CHANNELS_RAW_DATA::ID => {
35763                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
35764            }
35765            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
35766                RC_CHANNELS_SCALED_DATA::random(rng),
35767            )),
35768            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35769                REQUEST_DATA_STREAM_DATA::random(rng),
35770            )),
35771            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
35772            RESOURCE_REQUEST_DATA::ID => {
35773                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
35774            }
35775            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35776                RESPONSE_EVENT_ERROR_DATA::random(rng),
35777            )),
35778            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35779                SAFETY_ALLOWED_AREA_DATA::random(rng),
35780            )),
35781            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35782                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
35783            )),
35784            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
35785            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
35786            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
35787            SCALED_PRESSURE_DATA::ID => {
35788                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
35789            }
35790            SCALED_PRESSURE2_DATA::ID => {
35791                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
35792            }
35793            SCALED_PRESSURE3_DATA::ID => {
35794                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
35795            }
35796            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
35797            SERVO_OUTPUT_RAW_DATA::ID => {
35798                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
35799            }
35800            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
35801            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35802                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35803            )),
35804            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35805                SET_ATTITUDE_TARGET_DATA::random(rng),
35806            )),
35807            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35808                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
35809            )),
35810            SET_HOME_POSITION_DATA::ID => {
35811                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
35812            }
35813            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
35814            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35815                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35816            )),
35817            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35818                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35819            )),
35820            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
35821            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
35822                SMART_BATTERY_INFO_DATA::random(rng),
35823            )),
35824            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
35825            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35826                STORAGE_INFORMATION_DATA::random(rng),
35827            )),
35828            SUPPORTED_TUNES_DATA::ID => {
35829                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
35830            }
35831            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
35832            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
35833            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
35834            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
35835            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
35836            TERRAIN_REQUEST_DATA::ID => {
35837                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
35838            }
35839            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
35840            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35841                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
35842            )),
35843            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35844                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35845                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
35846                ))
35847            }
35848            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35849                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35850                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
35851                ))
35852            }
35853            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
35854            UAVCAN_NODE_INFO_DATA::ID => {
35855                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
35856            }
35857            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
35858                UAVCAN_NODE_STATUS_DATA::random(rng),
35859            )),
35860            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35861                UTM_GLOBAL_POSITION_DATA::random(rng),
35862            )),
35863            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
35864            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
35865            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
35866            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35867                VICON_POSITION_ESTIMATE_DATA::random(rng),
35868            )),
35869            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35870                VIDEO_STREAM_INFORMATION_DATA::random(rng),
35871            )),
35872            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35873                VIDEO_STREAM_STATUS_DATA::random(rng),
35874            )),
35875            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35876                VISION_POSITION_ESTIMATE_DATA::random(rng),
35877            )),
35878            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35879                VISION_SPEED_ESTIMATE_DATA::random(rng),
35880            )),
35881            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
35882            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
35883            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
35884            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
35885            _ => None,
35886        }
35887    }
35888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35889        match self {
35890            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
35891            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
35892            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
35893            Self::AIS_VESSEL(body) => body.ser(version, bytes),
35894            Self::ALTITUDE(body) => body.ser(version, bytes),
35895            Self::ATTITUDE(body) => body.ser(version, bytes),
35896            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
35897            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
35898            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
35899            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
35900            Self::AUTH_KEY(body) => body.ser(version, bytes),
35901            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
35902            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
35903            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
35904            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
35905            Self::BATTERY_INFO(body) => body.ser(version, bytes),
35906            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
35907            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
35908            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
35909            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
35910            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
35911            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
35912            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
35913            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
35914            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
35915            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
35916            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
35917            Self::CANFD_FRAME(body) => body.ser(version, bytes),
35918            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
35919            Self::CAN_FRAME(body) => body.ser(version, bytes),
35920            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
35921            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
35922            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
35923            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
35924            Self::COLLISION(body) => body.ser(version, bytes),
35925            Self::COMMAND_ACK(body) => body.ser(version, bytes),
35926            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
35927            Self::COMMAND_INT(body) => body.ser(version, bytes),
35928            Self::COMMAND_LONG(body) => body.ser(version, bytes),
35929            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
35930            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
35931            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
35932            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
35933            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
35934            Self::CURRENT_MODE(body) => body.ser(version, bytes),
35935            Self::DATA_STREAM(body) => body.ser(version, bytes),
35936            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
35937            Self::DEBUG(body) => body.ser(version, bytes),
35938            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
35939            Self::DEBUG_VECT(body) => body.ser(version, bytes),
35940            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
35941            Self::EFI_STATUS(body) => body.ser(version, bytes),
35942            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
35943            Self::ESC_INFO(body) => body.ser(version, bytes),
35944            Self::ESC_STATUS(body) => body.ser(version, bytes),
35945            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
35946            Self::EVENT(body) => body.ser(version, bytes),
35947            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
35948            Self::FENCE_STATUS(body) => body.ser(version, bytes),
35949            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
35950            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
35951            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
35952            Self::FUEL_STATUS(body) => body.ser(version, bytes),
35953            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
35954            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
35955            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
35956            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
35957            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
35958            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
35959            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
35960            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
35961            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
35962            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
35963            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
35964            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
35965            Self::GPS2_RAW(body) => body.ser(version, bytes),
35966            Self::GPS2_RTK(body) => body.ser(version, bytes),
35967            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
35968            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
35969            Self::GPS_INPUT(body) => body.ser(version, bytes),
35970            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
35971            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
35972            Self::GPS_RTK(body) => body.ser(version, bytes),
35973            Self::GPS_STATUS(body) => body.ser(version, bytes),
35974            Self::HEARTBEAT(body) => body.ser(version, bytes),
35975            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
35976            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
35977            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
35978            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
35979            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
35980            Self::HIL_GPS(body) => body.ser(version, bytes),
35981            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
35982            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
35983            Self::HIL_SENSOR(body) => body.ser(version, bytes),
35984            Self::HIL_STATE(body) => body.ser(version, bytes),
35985            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
35986            Self::HOME_POSITION(body) => body.ser(version, bytes),
35987            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
35988            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
35989            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
35990            Self::LANDING_TARGET(body) => body.ser(version, bytes),
35991            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
35992            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
35993            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
35994            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
35995            Self::LOGGING_ACK(body) => body.ser(version, bytes),
35996            Self::LOGGING_DATA(body) => body.ser(version, bytes),
35997            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
35998            Self::LOG_DATA(body) => body.ser(version, bytes),
35999            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36000            Self::LOG_ERASE(body) => body.ser(version, bytes),
36001            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36002            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36003            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36004            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36005            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36006            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36007            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36008            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36009            Self::MISSION_ACK(body) => body.ser(version, bytes),
36010            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36011            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36012            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36013            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36014            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36015            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36016            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36017            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36018            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36019            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36020            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36021            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36022            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36023            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36024            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36025            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36026            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36027            Self::ODOMETRY(body) => body.ser(version, bytes),
36028            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36029            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36030            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36031            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36032            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36033            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36034            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36035            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36036            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36037            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36038            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36039            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36040            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36041            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36042            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36043            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36044            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36045            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36046            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36047            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36048            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36049            Self::PARAM_SET(body) => body.ser(version, bytes),
36050            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36051            Self::PING(body) => body.ser(version, bytes),
36052            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36053            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36054            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36055            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36056            Self::POWER_STATUS(body) => body.ser(version, bytes),
36057            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36058            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36059            Self::RAW_IMU(body) => body.ser(version, bytes),
36060            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36061            Self::RAW_RPM(body) => body.ser(version, bytes),
36062            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36063            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36064            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36065            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36066            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36067            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36068            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36069            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36070            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36071            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36072            Self::SCALED_IMU(body) => body.ser(version, bytes),
36073            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36074            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36075            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36076            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36077            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36078            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36079            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36080            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36081            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36082            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36083            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36084            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36085            Self::SET_MODE(body) => body.ser(version, bytes),
36086            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36087            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36088            Self::SIM_STATE(body) => body.ser(version, bytes),
36089            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36090            Self::STATUSTEXT(body) => body.ser(version, bytes),
36091            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36092            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36093            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36094            Self::SYS_STATUS(body) => body.ser(version, bytes),
36095            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36096            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36097            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36098            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36099            Self::TIMESYNC(body) => body.ser(version, bytes),
36100            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36101            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36102            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36103            Self::TUNNEL(body) => body.ser(version, bytes),
36104            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36105            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36106            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36107            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36108            Self::VFR_HUD(body) => body.ser(version, bytes),
36109            Self::VIBRATION(body) => body.ser(version, bytes),
36110            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36111            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36112            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36113            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36114            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36115            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36116            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36117            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36118            Self::WIND_COV(body) => body.ser(version, bytes),
36119        }
36120    }
36121    fn extra_crc(id: u32) -> u8 {
36122        match id {
36123            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36124            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36125            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36126            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36127            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36128            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36129            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36130            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36131            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36132            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36133            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36134            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36135                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36136            }
36137            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36138            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36139            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36140            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36141            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36142            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36143            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36144            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36145            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36146            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36147            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36148            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36149            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36150            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36151            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36152            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36153            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36154            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36155            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36156            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36157            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36158            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36159            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36160            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36161            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36162            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36163            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36164            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36165            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36166            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36167            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36168            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36169            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36170            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36171            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36172            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36173            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36174            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36175            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36176            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36177            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36178            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36179            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36180            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36181            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36182            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36183            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36184            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36185            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36186            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36187            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36188            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36189            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36190            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36191            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36192            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36193            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36194            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36195                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36196            }
36197            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36198            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36199            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36200            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36201            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36202                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36203            }
36204            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36205            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36206            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36207            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36208            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36209            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36210            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36211            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36212            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36213            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36214            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36215            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36216            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36217            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36218            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36219            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36220            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36221            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36222            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36223            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36224            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36225            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36226            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36227            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36228            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36229            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36230            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36231            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36232            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36233            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36234                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36235            }
36236            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36237            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36238            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36239            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36240            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36241            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36242            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36243            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36244            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36245            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36246            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36247            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36248            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36249            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36250            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36251            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36252            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36253            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36254            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36255            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36256            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36257            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36258            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36259            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36260            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36261            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36262            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36263            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36264            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36265            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36266            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36267            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36268            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36269            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36270            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36271            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36272            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36273            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36274            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36275            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36276            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36277            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36278            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36279            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36280            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36281            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36282            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36283            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36284            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36285            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36286            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36287            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36288            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36289            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36290            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36291            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36292            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36293            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36294            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36295            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36296            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36297            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36298            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36299            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36300            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36301            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36302            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36303            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36304            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36305            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36306            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36307            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36308            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36309            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36310            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36311            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36312            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36313            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36314            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36315            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36316            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36317            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36318            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36319            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36320            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36321            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36322            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36323            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36324            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36325            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36326            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36327            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36328                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36329            }
36330            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36331            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36332            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36333            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36334            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36335            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36336            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36337            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36338            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36339            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36340            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36341            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36342            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36343            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36344            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36345                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36346            }
36347            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36348                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36349            }
36350            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36351            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36352            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36353            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36354            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36355            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36356            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36357            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36358            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36359            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36360            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36361            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36362            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36363            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36364            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36365            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36366            _ => 0,
36367        }
36368    }
36369    fn target_system_id(&self) -> Option<u8> {
36370        match self {
36371            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36372            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36373            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36374            Self::CAN_FRAME(inner) => Some(inner.target_system),
36375            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36376            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36377            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36378            Self::COMMAND_INT(inner) => Some(inner.target_system),
36379            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36380            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36381            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36382            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36383            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36384            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36385            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36386            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36387            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36388            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36389            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36390            Self::LOG_ERASE(inner) => Some(inner.target_system),
36391            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36392            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36393            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36394            Self::MISSION_ACK(inner) => Some(inner.target_system),
36395            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36396            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36397            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36398            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36399            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36400            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36401            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36402            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36403            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36404            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36405            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36406            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36407            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36408            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36409            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
36410            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
36411            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
36412            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
36413            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
36414            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
36415            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
36416            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
36417            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
36418            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
36419            Self::PARAM_SET(inner) => Some(inner.target_system),
36420            Self::PING(inner) => Some(inner.target_system),
36421            Self::PLAY_TUNE(inner) => Some(inner.target_system),
36422            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
36423            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
36424            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
36425            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
36426            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
36427            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
36428            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
36429            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
36430            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
36431            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
36432            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
36433            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
36434            Self::SET_MODE(inner) => Some(inner.target_system),
36435            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
36436            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
36437            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
36438            Self::TIMESYNC(inner) => Some(inner.target_system),
36439            Self::TUNNEL(inner) => Some(inner.target_system),
36440            Self::V2_EXTENSION(inner) => Some(inner.target_system),
36441            _ => None,
36442        }
36443    }
36444    fn target_component_id(&self) -> Option<u8> {
36445        match self {
36446            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
36447            Self::CANFD_FRAME(inner) => Some(inner.target_component),
36448            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
36449            Self::CAN_FRAME(inner) => Some(inner.target_component),
36450            Self::COMMAND_ACK(inner) => Some(inner.target_component),
36451            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
36452            Self::COMMAND_INT(inner) => Some(inner.target_component),
36453            Self::COMMAND_LONG(inner) => Some(inner.target_component),
36454            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
36455            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
36456            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
36457            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
36458            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
36459            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
36460            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
36461            Self::LOGGING_ACK(inner) => Some(inner.target_component),
36462            Self::LOGGING_DATA(inner) => Some(inner.target_component),
36463            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
36464            Self::LOG_ERASE(inner) => Some(inner.target_component),
36465            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
36466            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
36467            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
36468            Self::MISSION_ACK(inner) => Some(inner.target_component),
36469            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
36470            Self::MISSION_COUNT(inner) => Some(inner.target_component),
36471            Self::MISSION_ITEM(inner) => Some(inner.target_component),
36472            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
36473            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
36474            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
36475            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
36476            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
36477            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
36478            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
36479            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
36480            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
36481            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
36482            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
36483            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
36484            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
36485            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
36486            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
36487            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
36488            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
36489            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
36490            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
36491            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
36492            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
36493            Self::PARAM_SET(inner) => Some(inner.target_component),
36494            Self::PING(inner) => Some(inner.target_component),
36495            Self::PLAY_TUNE(inner) => Some(inner.target_component),
36496            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
36497            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
36498            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
36499            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
36500            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
36501            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
36502            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
36503            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
36504            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
36505            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
36506            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
36507            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
36508            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
36509            Self::TIMESYNC(inner) => Some(inner.target_component),
36510            Self::TUNNEL(inner) => Some(inner.target_component),
36511            Self::V2_EXTENSION(inner) => Some(inner.target_component),
36512            _ => None,
36513        }
36514    }
36515}